Cache function

Saves a wide variety function call outputs to disk and optionally RAM, for recovery later