| Server IP : 35.80.110.71 / Your IP : 216.73.216.221 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/fs/__pycache__/ |
Upload File : |
�
��ob � � � d Z ddlmZmZ ddlZddlmZ ej d� Z ej d� Z G d� deej ee f � Zy) z#Least Recently Used cache mapping.
� )�absolute_import�unicode_literalsN)�OrderedDict�_K�_Vc �2 � � e Zd ZdZ� fd�Zd� Z� fd�Z� xZS )�LRUCachez�A dictionary-like container that stores a given maximum items.
If an additional item is added when the LRUCache is full, the least
recently used key is discarded to make room for the new item.
c �8 �� || _ t t | � � y)z*Create a new LRUCache with the given size.N)�
cache_size�superr �__init__)�selfr � __class__s ��-/usr/lib/python3/dist-packages/fs/lrucache.pyr
zLRUCache.__init__ s �� � %���
�h��&�(� c � � || vr*t | � | j k\ r| j d�� t j | ||� y)z7Store a new views, potentially discarding an old value.F)�lastN)�lenr �popitemr �__setitem__)r �key�values r r zLRUCache.__setitem__ s; � � �d�?��4�y�D�O�O�+����%��(�����c�5�1r c � �� t j t t t | � � }|j |� }|j
|� |j ||� |S )z,Get the item, but also makes it most recent.)�typing�castr r r �__getitem__�__delitem__r )r r �_superr r s �r r zLRUCache.__getitem__$ sO �� � ���[�%��$�*?�@���"�"�3�'�����3�����3��&��r )�__name__�
__module__�__qualname__�__doc__r
r r �
__classcell__)r s @r r r s �� ��)�2�� r r )r"