Caching: implementation details¶
This section covers some details of the caching mechanism which are not discussed in the user guide. If you are developing a plugin and want to modify the caching behavior of your classes, we recommend you read this section first.
Disabling caching for
As discussed in the user guide, nodes which can have
RETURN links cannot be cached.
This is enforced on two levels:
_cachableproperty is set to
ProcessNode, and only re-enabled in the
CalculationNodesub class. This means that all calculation nodes and its sub classes
CalcFunctionNodeare cachable, but the
_store_from_cachemethod, which is used to “clone” an existing node, will raise an error if the source node has any
RETURNlinks. This extra safe-guard prevents cases where a user might incorrectly override the
_cachableproperty on a