Keystone Caching Layer Implementation.
Bases: dogpile.cache.proxy.ProxyBackend
Extra Logging ProxyBackend.
Build the cache region dictionary configuration.
Parameters: | conf – configuration object for keystone |
---|---|
Returns: | dict |
Configure a cache region.
Parameters: | region – optional CacheRegion object, if not provided a new region will be instantiated |
---|---|
Raises : | exception.ValidationError |
Returns: | dogpile.cache.CacheRegion |
Build a function that returns a config section’s caching status.
For any given driver in keystone that has caching capabilities, a boolean config option for that driver’s section (e.g. token) should exist and default to True. This function will use that value to tell the caching decorator if caching for that driver is enabled. To properly use this with the decorator, pass this function the configuration section and assign the result to a variable. Pass the new variable to the caching decorator as the named argument should_cache_fn. e.g.:
from keystone.common import cache
SHOULD_CACHE = cache.should_cache_fn('token')
@cache.on_arguments(should_cache_fn=SHOULD_CACHE)
def function(arg1, arg2):
...
Parameters: | section (string) – name of the configuration section to examine |
---|---|
Returns: | function reference |