HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //opt/alt/python37/lib/python3.7/site-packages/mako/ext/__pycache__/beaker_cache.cpython-37.pyc
B

�C]'
�@sZdZddlmZddlmZyddlmZWndZYnXdZda	Gdd	�d	e�Z
dS)
z<Provide a :class:`.CacheImpl` for the Beaker caching system.�)�
exceptions)�	CacheImpl)�cacheFTNcsHeZdZdZ�fdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	�Z
S)�BeakerCacheImplz�A :class:`.CacheImpl` provided for the Beaker caching system.

    This plugin is used by default, based on the default
    value of ``'beaker'`` for the ``cache_impl`` parameter of the
    :class:`.Template` or :class:`.TemplateLookup` classes.

    csLtst�d��tdkr8d|jjkr0|jjdant��att	|��
|�dS)Nz8Can't initialize Beaker plugin; Beaker is not installed.�manager)�
has_beakerrZRuntimeException�
_beaker_cache�template�
cache_args�beaker_cacheZCacheManager�superr�__init__)�selfr)�	__class__��F/opt/alt/python37/lib/python3.7/site-packages/mako/ext/beaker_cache.pyr
 szBeakerCacheImpl.__init__cKs�|�dd�}d|kr$|�d�|d<n|jjjr<|jjj|d<d|krN|�d�|�d�dkrdd|d<d|kr�|�d�}tj|jj|f|�}ntj|jjf|�}d	|jj	i}|r�||d
<||fS)N�timeout�dirZdata_dirr�typeZ	memcachedz
ext:memcached�region�	starttime�
expiretime)
�poprr	Zmodule_directory�getrZget_cache_region�idZ	get_cacher)r�kwrrrr
rrr�
_get_cache-s"


zBeakerCacheImpl._get_cachecKs&|jf|�\}}|j|fd|i|��S)NZ
createfunc)rr)r�keyZcreation_functionrrrrr�
get_or_createDszBeakerCacheImpl.get_or_createcKs$|jf|�\}}|j||f|�dS)N)r�put)rr�valuerrrrrrHszBeakerCacheImpl.putcKs|jf|�\}}|j|f|�S)N)rr)rrrrrrrrLszBeakerCacheImpl.getcKs"|jf|�\}}|j|f|�dS)N)rZremove_value)rrrrrrr�
invalidatePszBeakerCacheImpl.invalidate)�__name__�
__module__�__qualname__�__doc__r
rrrrr!�
__classcell__rr)rrrs
r)r%�makorZ
mako.cacherZbeakerrrrrrrrrr�<module>s