PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  Qc@snddlmZmZejdZejZeddddefdYZdefd YZ d S( i(tcompattutils mako.cachetbeakersmako.ext.beaker_cachetBeakerCacheImpltCachecBseZdZd Zd Zd ZdZdZdZ dZ dZ e Z dZ dZdZd Zd Zd ZRS( sRepresents a data content cache made available to the module space of a specific :class:`.Template` object. .. versionadded:: 0.6 :class:`.Cache` by itself is mostly a container for a :class:`.CacheImpl` object, which implements a fixed API to provide caching services; specific subclasses exist to implement different caching strategies. Mako includes a backend that works with the Beaker caching system. Beaker itself then supports a number of backends (i.e. file, memory, memcached, etc.) The construction of a :class:`.Cache` is part of the mechanics of a :class:`.Template`, and programmatic access to this cache is typically via the :attr:`.Template.cache` attribute. cGsht|tjr|rdS||_|jj|_|jj|_i|_ |j |jj |_ dS(N( t isinstanceRt string_typesttemplatetmodulet__name__tidt_modified_timet starttimet _def_regionst _load_implt cache_impltimpl(tselfRtargs((s./usr/lib/python2.7/site-packages/mako/cache.pyt__init__@s  cCstj||S(N(t_cache_pluginstload(Rtname((s./usr/lib/python2.7/site-packages/mako/cache.pyRKscKs|j||d|S(scRetrieve a value from the cache, using the given creation function to generate a new value.N(t_ctx_get_or_createtNone(Rtkeytcreation_functiontkw((s./usr/lib/python2.7/site-packages/mako/cache.pyt get_or_createNscKs5|jjs|S|jj|||j||S(scRetrieve a value from the cache, using the given creation function to generate a new value.(Rt cache_enabledRRt _get_cache_kw(RRRtcontextR((s./usr/lib/python2.7/site-packages/mako/cache.pyRTs   cKs&|jj|||j|ddS(sPlace a value in the cache. :param key: the value's key. :param value: the value. :param \**kw: cache configuration arguments. N(RtsetRR(RRtvalueR((s./usr/lib/python2.7/site-packages/mako/cache.pyR _s cKs|jj||j|dS(sFRetrieve a value from the cache. :param key: the value's key. :param \**kw: cache configuration arguments. The backend is configured using these arguments upon first request. Subsequent requests that use the same series of configuration values will use that same backend. N(RtgetRR(RRR((s./usr/lib/python2.7/site-packages/mako/cache.pyR"qs cKs#|jj||j|ddS(sFInvalidate a value in the cache. :param key: the value's key. :param \**kw: cache configuration arguments. The backend is configured using these arguments upon first request. Subsequent requests that use the same series of configuration values will use that same backend. N(Rt invalidateRR(RRR((s./usr/lib/python2.7/site-packages/mako/cache.pyR#}s cCs|jddddS(sWInvalidate the cached content of the "body" method for this template. t render_bodyt __M_defnameN(R#(R((s./usr/lib/python2.7/site-packages/mako/cache.pytinvalidate_bodyscCs|jd|dd|dS(s`Invalidate the cached content of a particular ``<%def>`` within this template. s render_%sR%N(R#(RR((s./usr/lib/python2.7/site-packages/mako/cache.pytinvalidate_defscCs|j|d|dS(sNInvalidate a nested ``<%def>`` within this template. Caching of nested defs is a blunt tool as there is no management of scope -- nested defs that use cache tags need to have names unique of all other nested defs in the template, else their content will be overwritten by each other. R%N(R#(RR((s./usr/lib/python2.7/site-packages/mako/cache.pytinvalidate_closures cCs|jdd}|s:|jjj}|j|nK||jkrY|j|}n,|jjj}|j|||j|<|r|jjr|j}|j d|n|S(NR%R( tpopRRt cache_argstcopytupdateR Rt pass_contextt setdefault(RRRtdefnamettmpl_kw((s./usr/lib/python2.7/site-packages/mako/cache.pyRs   N(R t __module__t__doc__RRR R RRRRR tputR"R#R&R'R(R(((s./usr/lib/python2.7/site-packages/mako/cache.pyRs        t CacheImplcBsAeZdZdZeZdZdZdZdZ RS(s:Provide a cache implementation for use by :class:`.Cache`.cCs ||_dS(N(tcache(RR5((s./usr/lib/python2.7/site-packages/mako/cache.pyRscKs tdS(s7Retrieve 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. :param key: the value's key. :param creation_function: function that when called generates a new value. :param \**kw: cache configuration arguments. N(tNotImplementedError(RRRR((s./usr/lib/python2.7/site-packages/mako/cache.pyRscKs tdS(sPlace a value in the cache. :param key: the value's key. :param value: the value. :param \**kw: cache configuration arguments. N(R6(RRR!R((s./usr/lib/python2.7/site-packages/mako/cache.pyR scKs tdS(sRetrieve a value from the cache. :param key: the value's key. :param \**kw: cache configuration arguments. N(R6(RRR((s./usr/lib/python2.7/site-packages/mako/cache.pyR"scKs tdS(sInvalidate a value in the cache. :param key: the value's key. :param \**kw: cache configuration arguments. N(R6(RRR((s./usr/lib/python2.7/site-packages/mako/cache.pyR#s( R R1R2RtFalseR-RR R"R#(((s./usr/lib/python2.7/site-packages/mako/cache.pyR4s   N( tmakoRRt PluginLoaderRtregistertregister_plugintobjectRR4(((s./usr/lib/python2.7/site-packages/mako/cache.pyts