A cache would be useful when on_demand variables are re-used in several other processes in a model, or even within the same process to compute the value of another (generally on_demand) variable.
In those cases, triggering multiple times their compute method is wasteful.
The cache must be cleared each time before the execution of a simulation stage.
A cache would be useful when on_demand variables are re-used in several other processes in a model, or even within the same process to compute the value of another (generally on_demand) variable.
In those cases, triggering multiple times their compute method is wasteful.
The cache must be cleared each time before the execution of a simulation stage.