403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/py/_path/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/py/_path/__pycache__/cacheutil.cpython-311.pyc
�

��a
���dZddlmZGd�de��ZGd�de��ZGd�de��ZGd	�d
e��ZGd�de��Zd
S)z�
This module contains multithread-safe cache implementations.

All Caches have

    getorbuild(key, builder)
    delentry(key)

methods and allow configuration when instantiating the cache class.
�)�timec�<�eZdZdd�Zd�Zd�Zd�Zdd�Zd�Zd	�Z	d
S)
�
BasicCache�c�V�||_t||dzz
��|_i|_dS)N�)�
maxentries�int�prunenum�_dict)�selfr	s  �4/usr/lib/python3/dist-packages/py/_path/cacheutil.py�__init__zBasicCache.__init__s,��$����J��A��5�6�6��
���
�
�
�c�8�|j���dS�N)r�clear�r
s rrzBasicCache.clears���
�������rc��|j|Sr)r)r
�keys  r�	_getentryzBasicCache._getentrys���z�#��rc�B�|���||j|<dSr)�_prunelowestweightr�r
r�entrys   r�	_putentryzBasicCache._putentrys#�����!�!�!���
�3���rFc�@�	|j|=dS#t$r|r�YdSwxYwr)r�KeyError)r
r�raisings   r�delentryzBasicCache.delentrysI��	��
�3������	�	�	��
��
�
�
�	���s��
�c��	|�|��}n<#t$r/|�||��}|�||��YnwxYw|jSr)rr�_buildr�value)r
r�builderrs    r�
getorbuildzBasicCache.getorbuild$sl��	'��N�N�3�'�'�E�E���	'�	'�	'��K�K��W�-�-�E��N�N�3��&�&�&�&�&�	'�����{�s��6A�Ac�(�t|j��}||jkrnd�|j���D��}|���||jz
}|dkr)|d|�D] \}}|�|d����dSdSdS)z' prune out entries with lowest weight. c�&�g|]\}}|j|f��S�)�weight)�.0rrs   r�
<listcomp>z1BasicCache._prunelowestweight.<locals>.<listcomp>1s3��>�>�>�&�C���l�C�(�>�>�>rrNF)r)�lenrr	�items�sortrr )r
�
numentriesr-�indexr)rs      rrzBasicCache._prunelowestweight,s������_�_�
����(�(�>�>�*.�*�*:�*:�*<�*<�>�>�>�E��J�J�L�L�L����.�E��q�y�y�#(��%��=�6�6�K�F�C��M�M�#�u�M�5�5�5�5�)�(��y�6�6rN)r)F)
�__name__�
__module__�__qualname__rrrrr r%rr(rrrr
s�����������
������ � � ��������6�6�6�6�6rrc��eZdZdZd�ZdS)�BuildcostAccessCachea� A BuildTime/Access-counting cache implementation.
        the weight of a value is computed as the product of

            num-accesses-of-a-value * time-to-build-the-value

        The values with the least such weights are evicted
        if the cache maxentries threshold is superceded.
        For implementation flexibility more than one object
        might be evicted at a time.
    c�t�t��}|��}t��}t|||z
��Sr)�gettime�WeightedCountingEntry)r
rr$�start�val�ends      rr"zBuildcostAccessCache._buildGs3���	�	���g�i�i���i�i��$�S�#�e�)�4�4�4rN)r1r2r3�__doc__r"r(rrr5r5:s-������	�	�5�5�5�5�5rr5c�0�eZdZd�Zd�Zee��ZdS)r8c�0�||_|x|_|_dSr)�_valuer)�
_oneweight)r
r#�	oneweights   rrzWeightedCountingEntry.__init__Os�����(1�1���d�o�o�orc�:�|xj|jz
c_|jSr)r)r@r?rs rr#zWeightedCountingEntry.valueSs�����t��&����{�rN)r1r2r3rr#�propertyr(rrr8r8Ns;������2�2�2����
�H�U�O�O�E�E�Err8c�0��eZdZdZd�fd�	Zd�Zd�Z�xZS)�
AgingCachez; This cache prunes out cache entries that are too old.
    r�$@c�f��tt|���|��||_dSr)�superrEr�
maxseconds)r
r	rI�	__class__s   �rrzAgingCache.__init__[s,���
�j�$���(�(��4�4�4�$����rc��|j|}|���r$|�|��t|���|Sr)r�	isexpiredr rrs   rrzAgingCache._getentry_sB���
�3����?�?���	 ��M�M�#�����3�-�-���rc�b�|��}t|t��|jz��}|Sr)�
AgingEntryr7rI)r
rr$r:rs     rr"zAgingCache._buildfs,���g�i�i���3��	�	�D�O� ;�<�<���r)rrF)r1r2r3r<rrr"�
__classcell__)rJs@rrErEXse���������%�%�%�%�%�%����������rrEc��eZdZd�Zd�ZdS)rNc�"�||_||_dSr)r#r))r
r#�expirationtimes   rrzAgingEntry.__init__ls����
�$����rc�4�t��}||jkSr)r7r))r
�ts  rrLzAgingEntry.isexpiredps���I�I���D�K��rN)r1r2r3rrLr(rrrNrNks2������%�%�%� � � � � rrNN)	r<rr7�objectrr5r8rErNr(rr�<module>rVs��	�	�!� � � � � �+6�+6�+6�+6�+6��+6�+6�+6�Z5�5�5�5�5�:�5�5�5�(�����F�������������& � � � � �� � � � � r

Youez - 2016 - github.com/yon3zu
LinuXploit