- class glue.core.state_objects.StateAttributeCacheHelper(state, attribute, cache=None, **kwargs)[source]¶
Generic class to help with caching values on a per-attribute basis
The state object with the callback properties to cache
The attribute name - this will be populated once a dataset is assigned to the helper
- cachedict, optional
A dictionary that can be used to hold the cache. This option can be used if a common cache should be shared between different helpers.
Additional keyword arguments are taken to be values that should be used/cached. The key should be the name to be understood by sub-classes of this base class, and the value should be the name of the attribute in the state.