
    (ph                        S r SrSSKrSSKrSSKr SSKJr  SSK	J
r
JrJrJrJrJr  SSK	Jr  SSK	Jr   " S	 S
\5      rS rSS jrSS jrSS jrSS jrS\R0                  S4S jrSS\R4                  S4S jrg! \ a	    SSKJr   Nrf = f)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                   *    \ rS rSrS r\S 5       rSrg)_UnboundTTLCache   c                 P    [         R                  " U [        R                  X5        g N)r   __init__mathinf)selfttltimers      B/var/www/html/venv/lib/python3.13/site-packages/cachetools/func.pyr   _UnboundTTLCache.__init__   s    $#5    c                     g r    )r   s    r   maxsize_UnboundTTLCache.maxsize   s    r    r"   N)__name__
__module____qualname____firstlineno__r   propertyr#   __static_attributes__r"   r    r   r   r      s    6  r    r   c                    ^ ^^ U UU4S jnU$ )Nc                    > T(       a  [         R                  O[         R                  n[        TU[	        5       SS9" U 5      nUU4S jUl        U$ )NT)cachekeylockinfoc                     > T TS.$ )Nr#   typedr"   r2   s   r   <lambda>+_cache.<locals>.decorator.<locals>.<lambda>    s
    w+Or    )r   typedkeyhashkeyr   r	   cache_parameters)funcr.   wrapperr-   r#   r3   s      r   	decorator_cache.<locals>.decorator   s8    $dmm$,,u#EG$GM#O r    r"   )r-   r#   r3   r;   s   ``` r   _cacher=      s     r       Fc                     U c  [        0 SU5      $ [        U 5      (       a  [        [        S5      SU5      " U 5      $ [        [        U 5      X5      $ )zDecorator 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   r2   s     r   r   r   &   sM     b$&&	'		inc51'::i('99r    c                     U c  [        0 SU5      $ [        U 5      (       a  [        [        S5      SU5      " U 5      $ [        [        U 5      X5      $ )zDecorator 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@   r   r2   s     r   r   r   4   M     b$&&	'		hsmS%099hw'88r    c                     U c  [        0 SU5      $ [        U 5      (       a  [        [        S5      SU5      " U 5      $ [        [        U 5      X5      $ )zDecorator 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   r2   s     r   r   r   B   rB   r    c                     SSK Jn  U" S[        SS9  U c  [        0 SU5      $ [	        U 5      (       a  [        [        S5      SU5      " U 5      $ [        [        U 5      X5      $ )zDecorator 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>   )warningsrE   DeprecationWarningr=   r@   r   )r#   r3   rE   s      r   r   r   P   s^    
 	#%7AFb$&&	'		hsmS%099hw'88r    c                     U c  [        0 SU5      $ [        U 5      (       a  [        [        SU5      SU5      " U 5      $ [        [        X5      X5      $ )zDecorator 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#   choicer3   s      r   r   r   a   sP     b$&&	'		gc6*C7@@gg.??r    iX  c                     U c  [        [        X5      SU5      $ [        U 5      (       a  [        [        SX5      SU5      " U 5      $ [        [        XU5      X5      $ )zDecorator 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=   r   r@   r   )r#   r   r   r3   s       r   r   r   o   sX    
 &s2D%@@	'		hsC/e<WEEhwU3WDDr    )r>   F)__doc____all__r   randomtime	threadingr	   ImportErrordummy_threading r   r   r   r   r   r   r   r   r   r=   r   r   r   r   rK   r   	monotonicr   r"   r    r   <module>rV      s    E
X   & I H  x :999" e @ s$.. 
EI  &%&s   A< <B
B