/opt/imunify360/venv/lib/python3.11/site-packages/diskcache/__pycache__
Edit: /opt/imunify360/venv/lib/python3.11/site-packages/diskcache/__pycache__/recipes.cpython-311.pyc (22061B)
§
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 ó> — || _ || _ || _ || _ d S ©N©Ú_cacheÚ_keyÚ_expireÚ_tag©ÚselfÚcacheÚkeyÚexpireÚtags úq/builddir/build/BUILD/imunify360-venv-2.6.3/opt/imunify360/venv/lib/python3.11/site-packages/diskcache/recipes.pyÚ__init__zAverager.__init__&