§
    ñyIf   ã                   ó  — d Z dZddlZddlZddlZ	 ddlmZ n# e$ r	 ddlmZ Y nw xY wddl	m
Z
mZmZmZmZmZ ddl	mZ ddl	mZ  G d	„ d
e¦  «        Zd„ Zdd„Zdd„Zdd„Zdd„Zdej        dfd„Zddej        dfd„ZdS )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                   ó*   — e Zd Zd„ Zed„ ¦   «         ZdS )Ú_UnboundTTLCachec                 óH   — t          j        | t          j        ||¦  «         d S ©N)r   Ú__init__ÚmathÚinf)ÚselfÚttlÚtimers      úC/var/www/piapp/venv/lib/python3.11/site-packages/cachetools/func.pyr   z_UnboundTTLCache.__init__   s!   € ÝÔ˜$¥¤¨#¨uÑ5Ô5Ð5Ð5Ð5ó    c                 ó   — d S r   © )r   s    r   Úmaxsizez_UnboundTTLCache.maxsize   s   € àˆtr   N)Ú__name__Ú
__module__Ú__qualname__r   Úpropertyr!   r    r   r   r   r      s>   € € € € € ð6ð 6ð 6ð ðð ñ „Xðð ð r   r   c                 ó   ‡ ‡‡— ˆ ˆˆfd„}|S )Nc                 ó¢   •— ‰rt           j        nt           j        } t          ‰|t	          ¦   «         d¬¦  «        | ¦  «        }ˆˆfd„|_        |S )NT)ÚcacheÚkeyÚlockÚinfoc                  ó   •— ‰ ‰dœS )N©r!   Útypedr    r-   s   €€r   ú<lambda>z+_cache.<locals>.decorator.<locals>.<lambda>    s   ø€ °wÈÐ+OÐ+O€ r   )r   ÚtypedkeyÚhashkeyr   r	   Úcache_parameters)Úfuncr)   Úwrapperr(   r!   r.   s      €€€r   Ú	decoratorz_cache.<locals>.decorator   sR   ø€ Ø$Ð6�dŒmˆm­$¬,ˆØG•&˜u¨#µE±G´GÀ$ÐGÑGÔGÈÑMÔMˆØ#OÐ#OÐ#OÐ#OÐ#OˆÔ Øˆr   r    )r(   r!   r.   r5   s   ``` r   Ú_cacher6      s0   øøø€ ðð ð ð ð ð ð ð Ðr   é€   Fc                 óÐ   — | €t          i d|¦  «        S t          | ¦  «        r' t          t          d¦  «        d|¦  «        | ¦  «        S t          t          | ¦  «        | |¦  «        S )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.

    Nr7   )r6   Úcallabler   r-   s     r   r   r   &   sg   € ð €Ý�b˜$ Ñ&Ô&Ð&Ý	�'Ñ	Ô	ð :Ø1�v•i ‘n”n c¨5Ñ1Ô1°'Ñ:Ô:Ð:å•i Ñ(Ô(¨'°5Ñ9Ô9Ð9r   c                 óÐ   — | €t          i d|¦  «        S t          | ¦  «        r' t          t          d¦  «        d|¦  «        | ¦  «        S t          t          | ¦  «        | |¦  «        S )z™Decorator to wrap a function with a memoizing callable that saves
    up to `maxsize` results based on a Least Frequently Used (LFU)
    algorithm.

    Nr7   )r6   r9   r   r-   s     r   r   r   4   óg   € ð €Ý�b˜$ Ñ&Ô&Ð&Ý	�'Ñ	Ô	ð 9Ø0�v•h˜s‘m”m S¨%Ñ0Ô0°Ñ9Ô9Ð9å•h˜wÑ'Ô'¨°%Ñ8Ô8Ð8r   c                 óÐ   — | €t          i d|¦  «        S t          | ¦  «        r' t          t          d¦  «        d|¦  «        | ¦  «        S t          t          | ¦  «        | |¦  «        S )z—Decorator to wrap a function with a memoizing callable that saves
    up to `maxsize` results based on a Least Recently Used (LRU)
    algorithm.

    Nr7   )r6   r9   r   r-   s     r   r   r   B   r;   r   c                 óÐ   — | €t          i d|¦  «        S t          | ¦  «        r' t          t          d¦  «        d|¦  «        | ¦  «        S t          t          | ¦  «        | |¦  «        S )z•Decorator to wrap a function with a memoizing callable that saves
    up to `maxsize` results based on a Most Recently Used (MRU)
    algorithm.
    Nr7   )r6   r9   r   r-   s     r   r   r   P   sg   € ð
 €Ý�b˜$ Ñ&Ô&Ð&Ý	�'Ñ	Ô	ð 9Ø0�v•h˜s‘m”m S¨%Ñ0Ô0°Ñ9Ô9Ð9å•h˜wÑ'Ô'¨°%Ñ8Ô8Ð8r   c                 óÔ   — | €t          i d|¦  «        S t          | ¦  «        r( t          t          d|¦  «        d|¦  «        | ¦  «        S t          t          | |¦  «        | |¦  «        S )z•Decorator to wrap a function with a memoizing callable that saves
    up to `maxsize` results based on a Random Replacement (RR)
    algorithm.

    Nr7   )r6   r9   r   )r!   Úchoicer.   s      r   r   r   ]   sn   € ð €Ý�b˜$ Ñ&Ô&Ð&Ý	�'Ñ	Ô	ð @Ø7�v•g˜c 6Ñ*Ô*¨C°Ñ7Ô7¸Ñ@Ô@Ð@å•g˜g vÑ.Ô.°¸Ñ?Ô?Ð?r   iX  c                 óô   — | €t          t          ||¦  «        d|¦  «        S t          | ¦  «        r) t          t          d||¦  «        d|¦  «        | ¦  «        S t          t          | ||¦  «        | |¦  «        S )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.
    Nr7   )r6   r   r9   r   )r!   r   r   r.   s       r   r   r   k   s}   € ð
 €ÝÕ& s¨EÑ2Ô2°D¸%Ñ@Ô@Ð@Ý	�'Ñ	Ô	ð EØ<�v•h˜s C¨Ñ/Ô/°°eÑ<Ô<¸WÑEÔEÐEå•h˜w¨¨UÑ3Ô3°W¸eÑDÔDÐDr   )r7   F)Ú__doc__Ú__all__r   ÚrandomÚtimeÚ	threadingr	   ÚImportErrorÚdummy_threadingÚ r   r   r   r   r   r   r   r   r   r6   r   r   r   r   r?   r   Ú	monotonicr   r    r   r   ú<module>rJ      s¬  ðØ EÐ Eà
X€à €€€Ø €€€Ø €€€ð&ØÐÐÐÐÐÐøØð &ð &ð &Ø%Ð%Ð%Ð%Ð%Ð%Ð%Ð%ð&øøøð IÐ HÐ HÐ HÐ HÐ HÐ HÐ HÐ HÐ HÐ HÐ HÐ HÐ HÐ HÐ HØ Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð ðð ð ð ð �xñ ô ð ðð ð ð:ð :ð :ð :ð9ð 9ð 9ð 9ð9ð 9ð 9ð 9ð
9ð 
9ð 
9ð 
9ð  ¤°eð @ð @ð @ð @ð ˜s¨$¬.Àð 
Eð 
Eð 
Eð 
Eð 
Eð 
Es   ’ ™'¦'