Ñò
]®œIc @ sÑ d Z d d k Z d d k Z d d k Z y e Wn# e j
o d d k l Z n Xd d k l Z d d k l
Z
d d k l Z e i
e ƒ Z d d d e d e e d „ Z d d d „ Z d
„ Z d S( s Caching decoratoriÿÿÿÿN( t Set( t decorator( t asbool( t
get_pylonst
cache_defaultt nevers content-types content-lengthc sW | o t i ƒ ‰ n d ‰ t ˆ ƒ ‰ ‡ ‡ ‡ ‡ ‡ ‡ ‡ ‡ f d † } t | ƒ S( s4 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.
``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.
c
s) t ˆ ƒ ‰ t i d ˆ
ˆ ˆ ˆ ƒ ˆ i i d d ƒ } t | ƒ p t i d ƒ ˆ ˆ ˆ Ž Sˆ
o• ˆ o ˆ i i i ƒ ‰ n# ˆ i ƒ ‰ ˆ i
t ˆ ˆ ƒ ƒ ˆ
d j oE t ˆ
t
ƒ o t ‡ f d † ˆ
Dƒ ƒ ‰ qú h ˆ ˆ
ˆ
6‰ qn d ‰ d } ˆ o ˆ d } n t ˆ ˆ | ƒ \ } ‰ ˆ o ˆ ˆ d