fictive.cache.base module

Basic implementations of the AbstractCache interface

Classes

ClassVariableCache

Cache implementation using a class attribute as the backing store

InstanceVariableCache

Cache implementation using an instance variable as the backing store

class fictive.cache.base.ClassVariableCache(cache_name='default', *args, **kwargs)[source]

Bases: fictive.cache.abstract.AbstractCache

Cache implementation using a class attribute as the backing store

(instances share a common backing store keyed by cache_name)

__init__(cache_name='default', *args, **kwargs)[source]
Parameters

cache_name (str) – shared cache cache_name this instance should use

class fictive.cache.base.InstanceVariableCache(*args, fetch_impl=None, **kwargs)[source]

Bases: fictive.cache.abstract.AbstractCache

Cache implementation using an instance variable as the backing store

(each instance will have a separate backing store)