class documentation

class BeakerCacheImpl(CacheImpl): (source)

View In Hierarchy

A :class:`.CacheImpl` provided for the Beaker caching system. This plugin is used by default, based on the default value of ``'beaker'`` for the ``cache_impl`` parameter of the :class:`.Template` or :class:`.TemplateLookup` classes.

Method __init__ Undocumented
Method get Retrieve a value from the cache.
Method get_or_create Retrieve a value from the cache, using the given creation function to generate a new value.
Method invalidate Invalidate a value in the cache.
Method put Undocumented
Method _get_cache Undocumented

Inherited from CacheImpl:

Method set Place a value in the cache.
Class Variable pass_context If ``True``, the :class:`.Context` will be passed to :meth:`get_or_create <.CacheImpl.get_or_create>` as the name ``'context'``.
Instance Variable cache Undocumented
def __init__(self, cache): (source)

Undocumented

def get(self, key, **kw): (source)

Retrieve a value from the cache. :param key: the value's key. :param \**kw: cache configuration arguments.

def get_or_create(self, key, creation_function, **kw): (source)

Retrieve a value from the cache, using the given creation function to generate a new value. This function *must* return a value, either from the cache, or via the given creation function. If the creation function is called, the newly created value should be populated into the cache under the given key before being returned. :param key: the value's key. :param creation_function: function that when called generates a new value. :param \**kw: cache configuration arguments.

def invalidate(self, key, **kw): (source)

Invalidate a value in the cache. :param key: the value's key. :param \**kw: cache configuration arguments.

def put(self, key, value, **kw): (source)

Undocumented

def _get_cache(self, **kw): (source)

Undocumented