X7ROOT File Manager
Current Path:
/lib/python2.7/site-packages/pip/_vendor/cachecontrol
lib
/
python2.7
/
site-packages
/
pip
/
_vendor
/
cachecontrol
/
??
..
??
__init__.py
(302 B)
??
__init__.pyc
(583 B)
??
__init__.pyo
(583 B)
??
_cmd.py
(1.29 KB)
??
_cmd.pyc
(2.01 KB)
??
_cmd.pyo
(2.01 KB)
??
adapter.py
(4.5 KB)
??
adapter.pyc
(3.44 KB)
??
adapter.pyo
(3.44 KB)
??
cache.py
(790 B)
??
cache.pyc
(2.34 KB)
??
cache.pyo
(2.34 KB)
??
caches
??
compat.py
(380 B)
??
compat.pyc
(618 B)
??
compat.pyo
(618 B)
??
controller.py
(12.72 KB)
??
controller.pyc
(8.87 KB)
??
controller.pyo
(8.87 KB)
??
filewrapper.py
(2.47 KB)
??
filewrapper.pyc
(2.6 KB)
??
filewrapper.pyo
(2.6 KB)
??
heuristics.py
(4.04 KB)
??
heuristics.pyc
(5.8 KB)
??
heuristics.pyo
(5.8 KB)
??
serialize.py
(6.38 KB)
??
serialize.pyc
(5.95 KB)
??
serialize.pyo
(5.95 KB)
??
wrapper.py
(498 B)
??
wrapper.pyc
(696 B)
??
wrapper.pyo
(696 B)
Editing: cache.py
""" The cache object API for implementing caches. The default is a thread safe in-memory dictionary. """ from threading import Lock class BaseCache(object): def get(self, key): raise NotImplemented() def set(self, key, value): raise NotImplemented() def delete(self, key): raise NotImplemented() def close(self): pass class DictCache(BaseCache): def __init__(self, init_dict=None): self.lock = Lock() self.data = init_dict or {} def get(self, key): return self.data.get(key, None) def set(self, key, value): with self.lock: self.data.update({key: value}) def delete(self, key): with self.lock: if key in self.data: self.data.pop(key)
Upload File
Create Folder