
    /h                     j    d Z ddlmZ  G d de          Z G d de          Z G d de          Zd	S )
zb
The cache object API for implementing caches. The default is a thread
safe in-memory dictionary.
    )Lockc                   (    e Zd Zd ZddZd Zd ZdS )	BaseCachec                     t                      NNotImplementedErrorselfkeys     Q/var/www/html/venv/lib/python3.11/site-packages/pip/_vendor/cachecontrol/cache.pygetzBaseCache.get       !###    Nc                     t                      r   r   r   r   valueexpiress       r   setzBaseCache.set   r   r   c                     t                      r   r   r
   s     r   deletezBaseCache.delete   r   r   c                     d S r    )r   s    r   closezBaseCache.close   s    r   r   )__name__
__module____qualname__r   r   r   r   r   r   r   r   r      sU        $ $ $$ $ $ $$ $ $    r   r   c                   *    e Zd ZddZd ZddZd ZdS )	DictCacheNc                 >    t                      | _        |pi | _        d S r   )r   lockdata)r   	init_dicts     r   __init__zDictCache.__init__   s    FF	O			r   c                 8    | j                             |d           S r   )r"   r   r
   s     r   r   zDictCache.get!   s    y}}S$'''r   c                 ~    | j         5  | j                            ||i           d d d            d S # 1 swxY w Y   d S r   )r!   r"   updater   s       r   r   zDictCache.set$   s    Y 	+ 	+Ic5\***	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+s   266c                     | j         5  || j        v r| j                            |           d d d            d S # 1 swxY w Y   d S r   )r!   r"   popr
   s     r   r   zDictCache.delete(   s    Y 	# 	#di	c"""	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	#s   $9= =r   )r   r   r   r$   r   r   r   r   r   r   r   r      sZ        $ $ $ $( ( (+ + + +# # # # #r   r   c                       e Zd ZdZd Zd ZdS )SeparateBodyBaseCacheag  
    In this variant, the body is not stored mixed in with the metadata, but is
    passed in (as a bytes-like object) in a separate call to ``set_body()``.

    That is, the expected interaction pattern is::

        cache.set(key, serialized_metadata)
        cache.set_body(key)

    Similarly, the body should be loaded separately via ``get_body()``.
    c                     t                      r   r   )r   r   bodys      r   set_bodyzSeparateBodyBaseCache.set_body:   r   r   c                     t                      )z6
        Return the body as file-like object.
        r   r
   s     r   get_bodyzSeparateBodyBaseCache.get_body=   s     "###r   N)r   r   r   __doc__r.   r0   r   r   r   r+   r+   .   s<        
 
$ $ $$ $ $ $ $r   r+   N)r1   	threadingr   objectr   r   r+   r   r   r   <module>r4      s   
              # # # # #	 # # #&$ $ $ $ $I $ $ $ $ $r   