Uname: Linux premium294.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
Software: LiteSpeed
PHP version: 8.1.32 [ PHP INFO ] PHP os: Linux
Server Ip: 104.21.16.1
Your Ip: 216.73.216.223
User: mjbynoyq (1574) | Group: mjbynoyq (1570)
Safe Mode: OFF
Disable Function:
NONE

name : cache.cpython-38.pyc
U

��.e��@s�dZddlZddlmZddlmZddlmZddlm	Z	m
Z
ddlmZddl
mZerhdd	lmZed
d��ZGdd
�d
e�ZdS)zHTTP cache implementation.
�N)�contextmanager)�	BaseCache)�	FileCache)�adjacent_tmp_file�replace)�
ensure_dir)�MYPY_CHECK_RUNNING)�Optionalc	cs(z
dVWnttfk
r"YnXdS)zvIf we can't access the cache then we can just skip caching and process
    requests as if caching wasn't enabled.
    N)�OSError�IOError�rr�?/usr/lib/python3.8/site-packages/pip/_internal/network/cache.py�suppressed_cache_errorss
rcs@eZdZdZ�fdd�Zdd�Zdd�Zdd	�Zd
d�Z�Z	S)�
SafeFileCachezw
    A file based cache which is safe to use even when the target directory may
    not be accessible or writable.
    cs(|dk	std��tt|���||_dS)Nz!Cache directory must not be None.)�AssertionError�superr�__init__�	directory)�selfr��	__class__rr
r&szSafeFileCache.__init__cCs4t�|�}t|dd��|g}tjj|jf|��S)N�)r�encode�list�os�path�joinr)r�nameZhashed�partsrrr
�_get_cache_path,s
zSafeFileCache._get_cache_pathcCsR|�|�}t��8t|d��"}|��W5QR�W5QR�SQRXW5QRXdS)N�rb)rr�open�read)r�keyr�frrr
�get5s
zSafeFileCache.getc
CsZ|�|�}t��@ttj�|��t|��}|�|�W5QRXt|j	|�W5QRXdS�N)
rrrrr�dirnamer�writerr)rr#�valuerr$rrr
�set<s

zSafeFileCache.setc	Cs*|�|�}t��t�|�W5QRXdSr&)rrr�remove)rr#rrrr
�deleteGs
zSafeFileCache.delete)
�__name__�
__module__�__qualname__�__doc__rrr%r*r,�
__classcell__rrrr
r s	r)r0r�
contextlibrZpip._vendor.cachecontrol.cacherZpip._vendor.cachecontrol.cachesrZpip._internal.utils.filesystemrrZpip._internal.utils.miscrZpip._internal.utils.typingr�typingr	rrrrrr
�<module>s

© 2025 XylotrechusZ