class documentation

class CacheImpl(object):

Known subclasses: mako.ext.beaker_cache.BeakerCacheImpl

View In Hierarchy

Provide a cache implementation for use by .Cache.
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 set Place a value in the cache.
Class Variable pass​_context If True, the .Context will be passed to get_or_create as the name 'context'.
Method __init__ Undocumented
Instance Variable cache Undocumented
def get(self, key, **kw):
Retrieve a value from the cache.
Parameters
keythe value's key.
**kwcache configuration arguments.
def get_or_create(self, key, creation_function, **kw):

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.

Parameters
keythe value's key.
creation​_functionfunction that when called generates a new value.
**kwcache configuration arguments.
def invalidate(self, key, **kw):
Invalidate a value in the cache.
Parameters
keythe value's key.
**kwcache configuration arguments.
def set(self, key, value, **kw):
Place a value in the cache.
Parameters
keythe value's key.
valuethe value.
**kwcache configuration arguments.
pass_context: bool =
If True, the .Context will be passed to get_or_create as the name 'context'.
def __init__(self, cache):

Undocumented

cache =

Undocumented