✏️ 正在编辑: recipes.cpython-311.pyc
路径:
/opt/imunify360/venv/lib/python3.11/site-packages/diskcache/__pycache__/recipes.cpython-311.pyc
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
� 7�(�C��� �� � d Z ddlZddlZddlZddlZddlZddlZddlmZm Z m Z G d� d� � Z G d� d� � Z G d � d � � Z G d� d� � Zdddej ej fd �Zdd�Z dd�ZdS )zDisk Cache Recipes � N� )�ENOVAL�args_to_key� full_namec �, � e Zd ZdZdd�Zd� Zd� Zd� ZdS )�AverageraL Recipe for calculating a running average. Sometimes known as "online statistics," the running average maintains the total and count. The average can then be calculated at any time. Assumes the key will not be evicted. Set the eviction policy to 'none' on the cache to guarantee the key is not evicted. >>> import diskcache >>> cache = diskcache.FanoutCache() >>> ave = Averager(cache, 'latency') >>> ave.add(0.080) >>> ave.add(0.120) >>> ave.get() 0.1 >>> ave.add(0.160) >>> ave.pop() 0.12 >>> print(ave.get()) None Nc �>