o
    /h-                     @   s   d dl Z d dlZd dlZd dlZejejejdZdZdZ	e
 ZejddZeevr7edde  d	eejd
e	iZedkrQeejdeed< ee di eZdd ZdS )    N)LFULRUTTLi     PREMAILER_CACHEr   z7Unsupported cache implementation. Available options: %s/maxsizePREMAILER_CACHE_MAXSIZEr   PREMAILER_CACHE_TTLttlc                  K   s   dd }|S )Nc                    s(   t jttdt  fdd}|S )N)lockc                     s    | i |S )N )argskwargsfuncr   C/var/www/html/myenv/lib/python3.10/site-packages/premailer/cache.pyinner,   s   z0function_cache.<locals>.decorator.<locals>.inner)
cachetoolscachedcachecache_access_lock	functoolswraps)r   r   r   r   r   	decorator+   s   z!function_cache.<locals>.decoratorr   )optionsr   r   r   r   function_cache*   s   r   r   )r   os	threadingr   LFUCacheLRUCacheTTLCacheCACHE_IMPLEMENTATIONSTTL_CACHE_TIMEOUTDEFAULT_CACHE_MAXSIZERLockr   environget
cache_type
ValueErrorjoinkeysintcache_init_optionsr   r   r   r   r   r   <module>   s4    