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()

set([cache])

set_cache(cache)

Attributes Documentation

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

Methods Documentation

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