403Webshell
Server IP : 192.158.238.246  /  Your IP : 3.144.84.11
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python37/lib/python3.7/site-packages/mako/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python37/lib/python3.7/site-packages/mako/__pycache__/cache.cpython-37.pyc
B

�C]8�@sXddlmZddlmZe�d�ZejZeddd�Gdd�de�ZGd	d
�d
e�Z	dS)�)�compat)�utilz
mako.cacheZbeakerzmako.ext.beaker_cacheZBeakerCacheImplc@sxeZdZdZdZdZdZdd�Zdd�Zdd�Z	d	d
�Z
dd�ZeZd
d�Z
dd�Zdd�Zdd�Zdd�Zdd�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.

    NcGsHt|tj�r|rdS||_|jj|_|jj|_i|_	|�
|jj�|_dS)N)
�
isinstancer�string_types�template�module�__name__�idZ_modified_time�	starttime�_def_regions�
_load_implZ
cache_impl�impl)�selfr�args�r�;/opt/alt/python37/lib/python3.7/site-packages/mako/cache.py�__init__Bs

zCache.__init__cCst�|�|�S)N)�_cache_plugins�load)r�namerrrr
MszCache._load_implcKs|j||df|�S)zcRetrieve a value from the cache, using the given creation function
        to generate a new value.N)�_ctx_get_or_create)r�key�creation_function�kwrrr�
get_or_createPszCache.get_or_createcKs(|jjs|�S|jj||f|�||��S)zcRetrieve a value from the cache, using the given creation function
        to generate a new value.)rZ
cache_enabledrr�
_get_cache_kw)rrr�contextrrrrrVszCache._ctx_get_or_createcKs|jj||f|�|d��dS)z�Place a value in the cache.

        :param key: the value's key.
        :param value: the value.
        :param \**kw: cache configuration arguments.

        N)r�setr)rr�valuerrrrras	z	Cache.setcKs|jj|f|�|d��S)aFRetrieve 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)r�getr)rrrrrrr ss
z	Cache.getcKs|jj|f|�|d��dS)aFInvalidate 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)r�
invalidater)rrrrrrr!s
zCache.invalidatecCs|jddd�dS)zWInvalidate the cached content of the "body" method for this
        template.

        Zrender_body)�__M_defnameN)r!)rrrr�invalidate_body�szCache.invalidate_bodycCs|jd|d|d�dS)z`Invalidate the cached content of a particular ``<%def>`` within this
        template.

        z	render_%s)r"N)r!)rrrrr�invalidate_def�szCache.invalidate_defcCs|j||d�dS)aNInvalidate 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!)rrrrr�invalidate_closure�szCache.invalidate_closurecCs�|�dd�}|s(|jj��}|�|�n6||jkr>|j|}n |jj��}|�|�||j|<|r~|jjr~|��}|�d|�|S)Nr"r)	�poprZ
cache_args�copy�updaterr�pass_context�
setdefault)rrrZdefnameZtmpl_kwrrrr�s


zCache._get_cache_kw)r	�
__module__�__qualname__�__doc__rr
rrr
rrr�putr r!r#r$r%rrrrrrs 

rc@s<eZdZdZdd�ZdZdd�Zdd�Zd	d
�Zdd�Z	d
S)�	CacheImplz:Provide a cache implementation for use by :class:`.Cache`.cCs
||_dS)N)�cache)rr0rrrr�szCacheImpl.__init__FcKs
t��dS)a7Retrieve 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)�NotImplementedError)rrrrrrrr�szCacheImpl.get_or_createcKs
t��dS)z�Place a value in the cache.

        :param key: the value's key.
        :param value: the value.
        :param \**kw: cache configuration arguments.

        N)r1)rrrrrrrr�sz
CacheImpl.setcKs
t��dS)z�Retrieve a value from the cache.

        :param key: the value's key.
        :param \**kw: cache configuration arguments.

        N)r1)rrrrrrr �sz
CacheImpl.getcKs
t��dS)z�Invalidate a value in the cache.

        :param key: the value's key.
        :param \**kw: cache configuration arguments.

        N)r1)rrrrrrr!�szCacheImpl.invalidateN)
r	r+r,r-rr)rrr r!rrrrr/�s
	r/N)
�makorrZPluginLoaderr�registerZregister_plugin�objectrr/rrrr�<module>s
)

Youez - 2016 - github.com/yon3zu
LinuXploit