REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.50 KB
Close
/proc/self/root/opt/alt/python38/lib/python3.8/site-packages/pip/_vendor/cachecontrol/cache.py
Text
Base64
# SPDX-FileCopyrightText: 2015 Eric Larson # # SPDX-License-Identifier: Apache-2.0 """ 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, expires=None): 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, expires=None): with self.lock: self.data.update({key: value}) def delete(self, key): with self.lock: if key in self.data: self.data.pop(key) class SeparateBodyBaseCache(BaseCache): """ In this variant, the body is not stored mixed in with the metadata, but is passed in (as a bytes-like object) in a separate call to ``set_body()``. That is, the expected interaction pattern is:: cache.set(key, serialized_metadata) cache.set_body(key) Similarly, the body should be loaded separately via ``get_body()``. """ def set_body(self, key, body): raise NotImplementedError() def get_body(self, key): """ Return the body as file-like object. """ raise NotImplementedError()
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 10
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
caches
DIR
-
drwxr-xr-x
2024-03-03 22:49:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__pycache__
DIR
-
drwxr-xr-x
2024-03-03 22:49:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
adapter.py
4.92 KB
lrw-r--r--
2023-11-13 21:40:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
cache.py
1.50 KB
lrw-r--r--
2023-11-13 21:40:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
compat.py
778 B
lrw-r--r--
2023-11-13 21:40:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
controller.py
16.03 KB
lrw-r--r--
2023-11-13 21:40:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
filewrapper.py
3.85 KB
lrw-r--r--
2023-11-13 21:40:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
heuristics.py
4.06 KB
lrw-r--r--
2023-11-13 21:40:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
serialize.py
6.94 KB
lrw-r--r--
2023-11-13 21:40:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
wrapper.py
774 B
lrw-r--r--
2023-11-13 21:40:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
_cmd.py
1.35 KB
lrw-r--r--
2023-11-13 21:40:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__init__.py
465 B
lrw-r--r--
2023-11-13 21:40:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).