# StateAttributeCacheHelper¶

class glue.core.state_objects.StateAttributeCacheHelper(state, attribute, cache=None, **kwargs)[source]

Bases: object

Generic class to help with caching values on a per-attribute basis

Parameters: The state object with the callback properties to cache attribute : str The attribute name - this will be populated once a dataset is assigned to the helper cache : dict, 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. kwargs 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.

Attributes Summary

Methods Summary

 invalidate_cache() set([cache]) set_cache(cache)

Attributes Documentation

component_id[source]
data[source]
data_component[source]
data_values[source]

Methods Documentation

invalidate_cache()[source]
set(cache=True, **kwargs)[source]
set_cache(cache)[source]