selinon.cache_config module¶
Configuration for caching.
-
class
selinon.cache_config.CacheConfig(name, import_path, configuration, entity_name)[source]¶ Bases:
objectConfiguration for Caching.
-
classmethod
from_dict(dict_, entity_name)[source]¶ Parse cache configuration from a dict.
Parameters: - dict – dict from which cache configuration should be parsed
- entity_name – entity name that will use the default cache - entity is either storage name or flow name (when caching async results)
Returns: cache for the given entity based on configuration
Return type:
-
classmethod
get_default(entity_name)[source]¶ Get default cache configuration.
Parameters: entity_name – entity name that will use the default cache - entity is either storage name or flow name (when caching async results) Returns: CacheConfig for the given entity Return type: CacheConfig
-
var_name¶ Name of variable in the generated Python code representing this cache.
Returns: name of cache variable that will be used in config.py file
-
classmethod
