OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
genai
/
venv
/
lib
/
python3.6
/
site-packages
/
pip
/
_vendor
/
cachecontrol
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/09/2024 06:59:59 AM
rwxr-xr-x
📄
__init__.py
302 bytes
05/09/2024 06:59:35 AM
rw-r--r--
📁
__pycache__
-
05/09/2024 07:00:00 AM
rwxr-xr-x
📄
_cmd.py
1.26 KB
05/09/2024 06:59:35 AM
rw-r--r--
📄
adapter.py
4.77 KB
05/09/2024 06:59:35 AM
rw-r--r--
📄
cache.py
805 bytes
05/09/2024 06:59:35 AM
rw-r--r--
📁
caches
-
05/09/2024 07:00:00 AM
rwxr-xr-x
📄
compat.py
695 bytes
05/09/2024 06:59:35 AM
rw-r--r--
📄
controller.py
13.82 KB
05/09/2024 06:59:35 AM
rw-r--r--
📄
filewrapper.py
2.47 KB
05/09/2024 06:59:35 AM
rw-r--r--
📄
heuristics.py
3.97 KB
05/09/2024 06:59:35 AM
rw-r--r--
📄
serialize.py
6.92 KB
05/09/2024 06:59:35 AM
rw-r--r--
📄
wrapper.py
690 bytes
05/09/2024 06:59:35 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)