Cache decorator utilizing Beaker. Caches action or other
function that returns a pickle-able object as a result.
Optional arguments:
- key
- None - No variable key, uses function name as key
“cache_default” - Uses all function arguments as the key
string - Use kwargs[key] as key
list - Use [kwargs[k] for k in list] as key
- expire
- Time in seconds before cache expires, or the string “never”.
Defaults to “never”
- type
- Type of cache to use: dbm, memory, file, memcached, or None for
Beaker’s default
- query_args
- Uses the query arguments as the key, defaults to False
- cache_headers
- A tuple of header names indicating response headers that
will also be cached.
- invalidate_on_startup
- If True, the cache will be invalidated each time the application
starts or is restarted.
If cache_enabled is set to False in the .ini file, then cache is
disabled globally.