OwlCyberSecurity - MANAGER
Edit File: cache.cpython-39.pyc
a )��e� � @ sD d Z ddlmZ G dd� de�ZG dd� de�ZG dd� de�Zd S ) zb The cache object API for implementing caches. The default is a thread safe in-memory dictionary. � )�Lockc @ s. e Zd Zdd� Zd dd�Zdd� Zdd � ZdS )� BaseCachec C s t � �d S �N��NotImplementedError��self�key� r �_/home/gouroczh/virtualenv/pat/3.9/lib/python3.9/site-packages/pip/_vendor/cachecontrol/cache.py�get s z BaseCache.getNc C s t � �d S r r �r r �value�expiresr r r �set s z BaseCache.setc C s t � �d S r r r r r r �delete s zBaseCache.deletec C s d S r r )r r r r �close s zBaseCache.close)N)�__name__� __module__�__qualname__r r r r r r r r r s r c @ s0 e Zd Zd dd�Zdd� Zddd�Zdd � ZdS )� DictCacheNc C s t � | _|pi | _d S r )r �lock�data)r Z init_dictr r r �__init__ s zDictCache.__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 � n1 s,0 Y d S r )r r �updater r r r r $ s z DictCache.setc C s@ | j �& || jv r| j�|� W d � n1 s20 Y d S r )r r �popr r r r r ( s zDictCache.delete)N)N)r r r r r r r r r r r r s r c @ s e Zd ZdZdd� Zdd� ZdS )�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 s t � �d S r r )r r �bodyr r r �set_body: s zSeparateBodyBaseCache.set_bodyc C s t � �dS )z6 Return the body as file-like object. Nr r r r r �get_body= s zSeparateBodyBaseCache.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