pylons.decorators.cache
– Cache Decorators¶Caching decorator
pylons.decorators.cache.
beaker_cache
(key='cache_default', expire='never', type=None, query_args=False, cache_headers=('content-type', 'content-length'), invalidate_on_startup=False, cache_response=True, **b_kwargs)¶Cache decorator utilizing Beaker. Caches action or other function that returns a pickle-able object as a result.
Optional arguments:
key
expire
type
query_args
cache_headers
invalidate_on_startup
cache_response
Determines whether the response at the time beaker_cache is used should be cached or not, defaults to True.
Note
When cache_response is set to False, the cache_headers argument is ignored as none of the response is cached.
If cache_enabled is set to False in the .ini file, then cache is disabled globally.