
    h              	       n    d dl mZ d dlmZmZmZ  ed      Z	 d	dee   deedef   gedef   f   fdZy)
    	lru_cache)CallableOptionalTypeVarTNmaxsizereturn.c                 P     dt         dt        f   dt         dt        f   f fd}|S )zB
    Wrapper for lru_cache that caches success and exceptions
    f.r
   c                 >     t               fd       fd}|S )N)r	   c                  N    	 d | i |fS # t         $ r}d|fcY d }~S d }~ww xY w)Nsuccesserror)	Exception)argskwargser   s      _/var/www/Befach/backend/env/lib/python3.12/site-packages/litellm/caching/_internal_lru_cache.pywrapperz5lru_cache_wrapper.<locals>.decorator.<locals>.wrapper   s7    $!1d#5f#566 $|#$s   	 	$$$c                  8     | i |}|d   dk(  r|d   |d   S )Nr   r       )r   r   resultr   s      r   wrappedz5lru_cache_wrapper.<locals>.decorator.<locals>.wrapped   s1    d-f-FayG#Qi!9    r   )r   r   r   r	   s   ` @r   	decoratorz$lru_cache_wrapper.<locals>.decorator   s&    	7	#	$ 
$	$	 r   )r   r   )r	   r   s   ` r   lru_cache_wrapperr      s0    Xc1f% (36*:   r   )N)		functoolsr   typingr   r   r   r   intr   r   r   r   <module>r"      sT     . .CL "c]xQ (36"223r   