관리-도구
편집 파일: cache.cpython-35.pyc
��Re% � @ sF d Z d d l m Z Gd d � d e � Z Gd 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 � Z d d � Z d d � Z d S) � BaseCachec C s t � � d S)N)�NotImplementedError)�self�key� r ��/builddir/build/BUILDROOT/alt-python35-pip-20.2.4-5.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/cachecontrol/cache.py�get s z BaseCache.getc C s t � � d S)N)r )r r �valuer r r �set s z BaseCache.setc C s t � � d S)N)r )r r r r r �delete s zBaseCache.deletec C s d S)Nr )r r r r �close s zBaseCache.closeN)�__name__� __module__�__qualname__r r r r r r r r r s r c @ sC e Z d Z d d d � Z d d � Z d d � Z d d � Z d S) � DictCacheNc C s t � | _ | p i | _ d S)N)r �lock�data)r � init_dictr r r �__init__ s zDictCache.__init__c C s | j j | d � S)N)r r )r r r r r r s z DictCache.getc C s+ | j � | j j | | i � Wd QRXd S)N)r r �update)r r r r r r r s z DictCache.setc C s4 | j �$ | | j k r) | j j | � Wd QRXd S)N)r r �pop)r r r r r r $ s zDictCache.delete)r r r r r r r r r r r r s r N)�__doc__� threadingr �objectr r r r r r �<module> s