OXIESEC PANEL
- Current Dir:
/
/
opt
/
alt
/
python37
/
lib
/
python3.7
/
site-packages
/
pip
/
_vendor
/
cachecontrol
Server IP: 2a02:4780:11:1084:0:327f:3464:10
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/16/2024 09:01:52 PM
rwxr-xr-x
📄
__init__.py
302 bytes
11/13/2023 09:31:06 PM
rw-r--r--
📁
__pycache__
-
02/16/2024 09:01:52 PM
rwxr-xr-x
📄
_cmd.py
1.26 KB
11/13/2023 09:31:06 PM
rw-r--r--
📄
adapter.py
4.77 KB
11/13/2023 09:31:06 PM
rw-r--r--
📄
cache.py
805 bytes
11/13/2023 09:31:06 PM
rw-r--r--
📁
caches
-
02/16/2024 09:01:52 PM
rwxr-xr-x
📄
compat.py
695 bytes
11/13/2023 09:31:06 PM
rw-r--r--
📄
controller.py
13.82 KB
11/13/2023 09:31:06 PM
rw-r--r--
📄
filewrapper.py
2.47 KB
11/13/2023 09:31:06 PM
rw-r--r--
📄
heuristics.py
3.97 KB
11/13/2023 09:31:06 PM
rw-r--r--
📄
serialize.py
6.92 KB
11/13/2023 09:31:06 PM
rw-r--r--
📄
wrapper.py
690 bytes
11/13/2023 09:31:06 PM
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)