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
stateglue.core.state_objects.State

The state object with the callback properties to cache

attributestr

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.

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

component_id

data

data_values

Methods Summary

invalidate_cache(self)

set(self[, cache])

set_cache(self, cache)

Attributes Documentation

component_id
data
data_values

Methods Documentation

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