OXIESEC PANEL
- Current Dir:
/
/
usr
/
local
/
lib
/
python3.6
/
dist-packages
/
pip
/
_vendor
/
cachecontrol
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
10/28/2024 06:26:52 AM
rwxr-xr-x
📄
__init__.py
302 bytes
10/28/2024 06:26:51 AM
rw-r--r--
📁
__pycache__
-
10/28/2024 06:26:52 AM
rwxr-xr-x
📄
_cmd.py
1.26 KB
10/28/2024 06:26:51 AM
rw-r--r--
📄
adapter.py
4.77 KB
10/28/2024 06:26:51 AM
rw-r--r--
📄
cache.py
805 bytes
10/28/2024 06:26:51 AM
rw-r--r--
📁
caches
-
10/28/2024 06:26:52 AM
rwxr-xr-x
📄
compat.py
695 bytes
10/28/2024 06:26:51 AM
rw-r--r--
📄
controller.py
13.82 KB
10/28/2024 06:26:51 AM
rw-r--r--
📄
filewrapper.py
2.47 KB
10/28/2024 06:26:51 AM
rw-r--r--
📄
heuristics.py
3.97 KB
10/28/2024 06:26:51 AM
rw-r--r--
📄
serialize.py
6.92 KB
10/28/2024 06:26:51 AM
rw-r--r--
📄
wrapper.py
690 bytes
10/28/2024 06:26:51 AM
rw-r--r--
Editing: cache.py
Close
""" 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 NotImplementedError() def set(self, key, value): raise NotImplementedError() def delete(self, key): raise NotImplementedError() 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)