o
    a+)hÿ  ã                   @   sD   d Z ddlmZ G dd„ deƒZG dd„ deƒZG dd„ deƒZd	S )
zb
The cache object API for implementing caches. The default is a thread
safe in-memory dictionary.
é    )ÚLockc                   @   s.   e Zd Zdd„ Zd
dd„Zdd„ Zdd	„ ZdS )Ú	BaseCachec                 C   ó   t ƒ ‚©N©ÚNotImplementedError©ÚselfÚkey© r   ú]C:\Users\User\Downloads\Proyecto_IoT\venv\Lib\site-packages\pip/_vendor/cachecontrol/cache.pyÚget   ó   zBaseCache.getNc                 C   r   r   r   ©r	   r
   ÚvalueÚexpiresr   r   r   Úset   r   zBaseCache.setc                 C   r   r   r   r   r   r   r   Údelete   r   zBaseCache.deletec                 C   s   d S r   r   )r	   r   r   r   Úclose   s   zBaseCache.closer   )Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r   r   r   r      s
    
r   c                   @   s0   e Zd Zd
dd„Zdd„ Zd
dd„Zdd	„ ZdS )Ú	DictCacheNc                 C   s   t ƒ | _|pi | _d S r   )r   ÚlockÚdata)r	   Ú	init_dictr   r   r   Ú__init__   s   zDictCache.__init__c                 C   s   | j  |d ¡S r   )r   r   r   r   r   r   r   !   s   zDictCache.getc                 C   s<   | j  | j ||i¡ W d   ƒ d S 1 sw   Y  d S r   )r   r   Úupdater   r   r   r   r   $   s   "ÿzDictCache.setc                 C   sR   | j  || jv r| j |¡ W d   ƒ d S W d   ƒ d S 1 s"w   Y  d S r   )r   r   Úpopr   r   r   r   r   (   s   
þ"ÿzDictCache.deleter   )r   r   r   r   r   r   r   r   r   r   r   r      s
    

r   c                   @   s    e Zd ZdZdd„ Zd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                 C   r   r   r   )r	   r
   Úbodyr   r   r   Úset_body:   r   zSeparateBodyBaseCache.set_bodyc                 C   r   )z6
        Return the body as file-like object.
        r   r   r   r   r   Úget_body=   s   zSeparateBodyBaseCache.get_bodyN)r   r   r   Ú__doc__r!   r"   r   r   r   r   r   .   s    r   N)r#   Ú	threadingr   Úobjectr   r   r   r   r   r   r   Ú<module>   s
   