OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
reader
/
venv
/
lib
/
python3.6
/
site-packages
/
pip
/
_vendor
/
cachecontrol
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
03/03/2025 08:48:37 AM
rwxr-xr-x
📄
__init__.py
302 bytes
03/03/2025 08:48:30 AM
rw-r--r--
📄
_cmd.py
1.26 KB
03/03/2025 08:48:30 AM
rw-r--r--
📄
adapter.py
4.77 KB
03/03/2025 08:48:30 AM
rw-r--r--
📄
cache.py
805 bytes
03/03/2025 08:48:30 AM
rw-r--r--
📁
caches
-
03/03/2025 09:04:54 AM
rwxr-xr-x
📄
compat.py
695 bytes
03/03/2025 08:48:30 AM
rw-r--r--
📄
controller.py
13.82 KB
03/03/2025 08:48:30 AM
rw-r--r--
📄
filewrapper.py
2.47 KB
03/03/2025 08:48:30 AM
rw-r--r--
📄
heuristics.py
3.97 KB
03/03/2025 08:48:30 AM
rw-r--r--
📄
serialize.py
6.92 KB
03/03/2025 08:48:30 AM
rw-r--r--
📄
wrapper.py
690 bytes
03/03/2025 08:48:30 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)