Jo^> d dl mZ ej d Zej Z eddd G d d Z G d d Zd S ) )utilz mako.cachebeakerzmako.ext.beaker_cacheBeakerCacheImplc l e Zd ZdZdZ dZ dZ d Zd Zd Z d Z d ZeZ d Z d Zd Zd Zd Zd ZdS )Cachea Represents 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. Nc t |t r|rd S || _ |j j | _ |j j | _ i | _ | | j j | _ d S N) isinstancestrtemplatemodule__name__id_modified_time starttime_def_regions _load_impl cache_implimpl)selfr argss \/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/mako/cache.py__init__zCache.__init__A se h$$ F /*!7OODM$<== c F t | | S r )_cache_pluginsloadr names r r zCache._load_implL s ""4((...r c " | j ||dfi |S )cRetrieve a value from the cache, using the given creation function to generate a new value.N)_ctx_get_or_creater keycreation_functionkws r get_or_createzCache.get_or_createO s$ 't&s,=tJJrJJJr c ~ | j j s | S | j j ||fi | || S )r! )r cache_enabledr r' _get_cache_kw)r r$ r% contextr&