Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/site-packages/cachetools/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/site-packages/cachetools/__pycache__/func.cpython-38.pyc
U

O��g��@s�dZdZddlZddlZddlZzddlmZWn ek
rPddlmZYnXddl	m
Z
mZmZm
Z
mZmZddl	mZddl	mZGd	d
�d
e�Zdd�Zddd�Zddd�Zddd�Zddd�Zd
ejdfdd�Zd
dejdfdd�ZdS) z?`functools.lru_cache` compatible memoizing function decorators.)�
fifo_cache�	lfu_cache�	lru_cache�	mru_cache�rr_cache�	ttl_cache�N)�RLock�)�	FIFOCache�LFUCache�LRUCache�MRUCache�RRCache�TTLCache)�cached)�keysc@s eZdZdd�Zedd��ZdS)�_UnboundTTLCachecCst�|tj||�dS�N)r�__init__�math�inf)�self�ttl�timer�r�</opt/cppython/lib/python3.8/site-packages/cachetools/func.pyrsz_UnboundTTLCache.__init__cCsdSrr)rrrr�maxsizesz_UnboundTTLCache.maxsizeN)�__name__�
__module__�__qualname__r�propertyrrrrrrsrcs���fdd�}|S)Ncs:�r
tjntj}t�|t�dd�|�}��fdd�|_|S)NT)�cache�key�lock�infocs
��d�S)N�r�typedrrr%rr�<lambda> �z+_cache.<locals>.decorator.<locals>.<lambda>)rZtypedkeyZhashkeyrrZcache_parameters)�funcr"�wrapper�r!rr&rr�	decoratorsz_cache.<locals>.decoratorr)r!rr&r,rr+r�_cachesr-�FcCsD|dkrtid|�St|�r0ttd�d|�|�Stt|�||�SdS)z�Decorator to wrap a function with a memoizing callable that saves
    up to `maxsize` results based on a First In First Out (FIFO)
    algorithm.

    Nr.)r-�callabler
r%rrrr&s
rcCsD|dkrtid|�St|�r0ttd�d|�|�Stt|�||�SdS)z�Decorator to wrap a function with a memoizing callable that saves
    up to `maxsize` results based on a Least Frequently Used (LFU)
    algorithm.

    Nr.)r-r/rr%rrrr4s
rcCsD|dkrtid|�St|�r0ttd�d|�|�Stt|�||�SdS)z�Decorator to wrap a function with a memoizing callable that saves
    up to `maxsize` results based on a Least Recently Used (LRU)
    algorithm.

    Nr.)r-r/rr%rrrrBs
rcCs^ddlm}|dtdd�|dkr.tid|�St|�rJttd�d|�|�Stt|�||�SdS)z�Decorator to wrap a function with a memoizing callable that saves
    up to `maxsize` results based on a Most Recently Used (MRU)
    algorithm.
    r)�warnz@mru_cache is deprecated�)�
stacklevelNr.)�warningsr0�DeprecationWarningr-r/r
)rr&r0rrrrPsrcCsH|dkrtid|�St|�r2ttd|�d|�|�Stt||�||�SdS)z�Decorator to wrap a function with a memoizing callable that saves
    up to `maxsize` results based on a Random Replacement (RR)
    algorithm.

    Nr.)r-r/r)r�choicer&rrrras
riXcCsR|dkrtt||�d|�St|�r:ttd||�d|�|�Stt|||�||�SdS)z�Decorator to wrap a function with a memoizing callable that saves
    up to `maxsize` results based on a Least Recently Used (LRU)
    algorithm with a per-item time-to-live (TTL) value.
    Nr.)r-rr/r)rrrr&rrrros
r)r.F)r.F)r.F)r.F)�__doc__�__all__r�random�time�	threadingr�ImportErrorZdummy_threading�r
rrr
rrrrrr-rrrrr5r�	monotonicrrrrr�<module>s& 	






F1le Man4ger