CacheableLoadRule#
Module: iqm.cpc.core.observation.observation_loading_rules
- class iqm.cpc.core.observation.observation_loading_rules.CacheableLoadRule(storage=None)#
Bases:
RuleTypeInterface for an observation loading rule for which the observation data can be preloaded to a cache.
Note that generally load rules do not need to implement this interface — it is enough that they subclass
RuleType.Attributes
Returns the full name including the attributes.
Methods
Applies the rule for preloaded cache.
- Parameters:
storage (StorageInterface | None)
- abstractmethod resolve_from_cache(observation_name, cache_data, default_storage)#
Applies the rule for preloaded cache.
- Parameters:
observation_name (str) – The
dut_fieldof the observation to be loaded.cache_data (Any) – The cache data to be used for loading the observation.
default_storage (StorageInterface | None) – The default storage backend to use if the rule does not have its own storage backend.
- Returns:
The loaded observation, or
Noneif the rule could not load the observation.- Return type:
ObservationDefinition | None
Inheritance
