/opt/imunify360/venv/lib/python3.11/site-packages/diskcache/__pycache__
NameSizeModeActions
cli.cpython-311.pyc2690644editdlrm
core.cpython-311.pyc954450644editdlrm
djangocache.cpython-311.pyc197340644editdlrm
fanout.cpython-311.pyc318780644editdlrm
persistent.cpython-311.pyc460320644editdlrm
recipes.cpython-311.pyc220610644editdlrm
__init__.cpython-311.pyc16760644editdlrm
Edit: /opt/imunify360/venv/lib/python3.11/site-packages/diskcache/__pycache__/djangocache.cpython-311.pyc (19734B)
§ aÅ2Z퇌ãóˆ—dZddlmZddlmZ ddlmZn #e$rdZYnwxYwddlmZm Z m Z ddl m Z Gd „d e¦«Z d S) ú-Django-compatible disk and file backed cache.é)Úwraps)Ú BaseCache)ÚDEFAULT_TIMEOUTi,é)ÚENOVALÚ args_to_keyÚ full_name)Ú FanoutCachecó‡—eZdZdZˆfd„Zed„¦«Zd„Zd d„Zd„Z e dddd fd „Z d!d „Z d d „Z e dddd fd „Ze dd fd„Z d"d„Zd#d„Zd$d„Zd$d„Zd d„Zd„Zd%d„Zd„Zd„Zd„Zd„Zd„Zd„Ze fd„Zde ddddfd„ZˆxZS)&Ú DjangoCachercóö•—t¦« |¦«| dd¦«}| dd¦«}| di¦«}t|||fi|¤Ž|_dS)z†Initialize DjangoCache instance. :param str directory: cache directory :param dict params: cache parameters ÚSHARDSéÚDATABASE_TIMEOUTg{®Gáz„?ÚOPTIONSN)ÚsuperÚ__init__Úgetr Ú_cache)ÚselfÚ directoryÚparamsÚshardsÚtimeoutÚoptionsÚ __class__s €úu/builddir/build/BUILD/imunify360-venv-2.6.3/opt/imunify360/venv/lib/python3.11/site-packages/diskcache/djangocache.pyrzDjangoCache.__init__svø€õ ‰Œ×Ò˜Ñ Ô Ð Ø—’˜H aÑ(Ô(ˆØ—*’*Ð/°Ñ7Ô7ˆØ—*’*˜Y¨Ñ+Ô+ˆÝ! )¨V°WÐHÐHÀÐHÐHˆŒ ˆ ˆ ócó—|jjS)zCache directory.)rr©rs rrzDjangoCache.directory!s€ðŒ{Ô$Ð$rcó6—|j |¦«S)z–Return Cache with given `name` in subdirectory. :param str name: subdirectory name for Cache :return: Cache with given name )rÚcache©rÚnames rr#zDjangoCache.cache&ó€ðŒ{× Ò  Ñ&Ô&Ð&rNcó:—|j ||¬¦«S)zÏReturn Deque with given `name` in subdirectory. :param str name: subdirectory name for Deque :param maxlen: max length (default None, no max) :return: Deque with given name )Úmaxlen)rÚdeque)rr%r(s rr)zDjangoCache.deque/s€ðŒ{× Ò  ¨fÐ Ñ5Ô5Ð5rcó6—|j |¦«S)z–Return Index with given `name` in subdirectory. :param str name: subdirectory name for Index :return: Index with given name )rÚindexr$s rr+zDjangoCache.index9r&rFTcóš—| ||¬¦«}| |¬¦«}|j ||||||¦«S)aôSet a value in the cache if the key does not already exist. If timeout is given, that timeout will be used for the key; otherwise the default cache timeout will be used. Return True if the value was stored, False otherwise. :param key: key for item :param value: value for item :param float timeout: seconds until the item expires (default 300 seconds) :param int version: key version number (default None, cache parameter) :param bool read: read value as bytes from file (default False) :param str tag: text to associate with key (default None) :param bool retry: retry if database timeout occurs (default True) :return: True if item was added ©Úversion©r)Úmake_keyÚget_backend_timeoutrÚadd©rÚkeyÚvaluerr.ÚreadÚtagÚretrys rr2zDjangoCache.addBsM€ð8�mŠm˜C¨ˆmÑ1Ô1ˆØ×*Ò*°7Ð*Ñ;Ô;ˆØŒ{�Š˜s E¨7°D¸#¸uÑEÔEÐErcón—| ||¬¦«}|j ||||||¦«S)a¼Fetch a given key from the cache. If the key does not exist, return default, which itself defaults to None. :param key: key for item :param default: return value if key is missing (default None) :param int version: key version number (default None, cache parameter) :param bool read: if True, return file handle to value (default False) :param float expire_time: if True, return expire_time in tuple (default False) :param tag: if True, return tag in tuple (default False) :param bool retry: retry if database timeout occurs (default False) :return: value for item if key is found else default r-)r0rr)rr4Údefaultr.r6Ú expire_timer7r8s rrzDjangoCache.getbs7€ð4�mŠm˜C¨ˆmÑ1Ô1ˆØŒ{�Š˜s G¨T°;ÀÀUÑKÔKÐKrcód—| ||¬¦«}|j |¦«S)aReturn file handle corresponding to `key` from Cache. :param key: Python key to retrieve :param int version: key version number (default None, cache parameter) :return: file open for reading in binary mode :raises KeyError: if key is not found r-)r0rr6©rr4r.s rr6zDjangoCache.reads/€ð�mŠm˜C¨ˆmÑ1Ô1ˆØŒ{×Ò Ñ$Ô$Ð$rcóš—| ||¬¦«}| |¬¦«}|j ||||||¦«S)a‰Set a value in the cache. If timeout is given, that timeout will be used for the key; otherwise the default cache timeout will be used. :param key: key for item :param value: value for item :param float timeout: seconds until the item expires (default 300 seconds) :param int version: key version number (default None, cache parameter) :param bool read: read value as bytes from file (default False) :param str tag: text to associate with key (default None) :param bool retry: retry if database timeout occurs (default True) :return: True if item was set r-r/)r0r1rÚsetr3s rr?zDjangoCache.set‹sM€ð2�mŠm˜C¨ˆmÑ1Ô1ˆØ×*Ò*°7Ð*Ñ;Ô;ˆØŒ{�Š˜s E¨7°D¸#¸uÑEÔEÐErcó”—| ||¬¦«}| |¬¦«}|j |||¦«S)aÝTouch a key in the cache. If timeout is given, that timeout will be used for the key; otherwise the default cache timeout will be used. :param key: key for item :param float timeout: seconds until the item expires (default 300 seconds) :param int version: key version number (default None, cache parameter) :param bool retry: retry if database timeout occurs (default True) :return: True if key was touched r-r/)r0r1rÚtouch)rr4rr.r8s rrAzDjangoCache.touch¨sI€ð�mŠm˜C¨ˆmÑ1Ô1ˆØ×*Ò*°7Ð*Ñ;Ô;ˆØŒ{× Ò   g¨uÑ5Ô5Ð5rcól—| ||¬¦«}|j |||||¦«S)a¥Remove corresponding item for `key` from cache and return value. If `key` is missing, return `default`. Operation is atomic. Concurrent operations will be serialized. :param key: key for item :param default: return value if key is missing (default None) :param int version: key version number (default None, cache parameter) :param float expire_time: if True, return expire_time in tuple (default False) :param tag: if True, return tag in tuple (default False) :param bool retry: retry if database timeout occurs (default True) :return: value for item if key is found else default r-)r0rÚpop)rr4r:r.r;r7r8s rrCzDjangoCache.pop¹s5€ð2�mŠm˜C¨ˆmÑ1Ô1ˆØŒ{�Š˜s G¨[¸#¸uÑEÔEÐErcóf—| ||¬¦«}|j ||¦«S)aDelete a key from the cache, failing silently. :param key: key for item :param int version: key version number (default None, cache parameter) :param bool retry: retry if database timeout occurs (default True) :return: True if item was deleted r-)r0rÚdelete)rr4r.r8s rrEzDjangoCache.deleteÕs1€ð�mŠm˜C¨ˆmÑ1Ô1ˆØŒ{×!Ò! # uÑ-Ô-Ð-rrcó®—| ||¬¦«} |j ||||¦«S#t$rt d|z¦«d‚wxYw)a”Increment value by delta for item with key. If key is missing and default is None then raise KeyError. Else if key is missing and default is not None then use default for value. Operation is atomic. All concurrent increment operations will be counted individually. Assumes value may be stored in a SQLite column. Most builds that target machines with 64-bit pointer widths will support 64-bit signed integers. :param key: key for item :param int delta: amount to increment (default 1) :param int version: key version number (default None, cache parameter) :param int default: value if key is missing (default None) :param bool retry: retry if database timeout occurs (default True) :return: new value for item on success else None :raises ValueError: if key is not found and default is None r-zKey '%s' not foundN)r0rÚincrÚKeyErrorÚ ValueError©rr4Údeltar.r:r8s rrGzDjangoCache.incrâsp€ð.�mŠm˜C¨ˆmÑ1Ô1ˆð CØ”;×#Ò# C¨°¸Ñ?Ô?Ð ?øÝð Cð Cð CÝÐ1°CÑ7Ñ8Ô8¸dÐ Bð Cøøøs ™6¶Acó6—| || |||¦«S)aûDecrement value by delta for item with key. If key is missing and default is None then raise KeyError. Else if key is missing and default is not None then use default for value. Operation is atomic. All concurrent decrement operations will be counted individually. Unlike Memcached, negative values are supported. Value may be decremented below zero. Assumes value may be stored in a SQLite column. Most builds that target machines with 64-bit pointer widths will support 64-bit signed integers. :param key: key for item :param int delta: amount to decrement (default 1) :param int version: key version number (default None, cache parameter) :param int default: value if key is missing (default None) :param bool retry: retry if database timeout occurs (default True) :return: new value for item on success else None :raises ValueError: if key is not found and default is None )rGrJs rÚdecrzDjangoCache.decrÿs €ð4�yŠy˜˜u˜f g¨w¸Ñ>Ô>Ð>rcóB—| ||¬¦«}||jvS)zÝReturns True if the key is in the cache and has not expired. :param key: key for item :param int version: key version number (default None, cache parameter) :return: True if key is found r-)r0rr=s rÚhas_keyzDjangoCache.has_keys&€ð�mŠm˜C¨ˆmÑ1Ô1ˆØ�d”kÐ!Ð!rcó4—|j ¦«S)zSRemove expired items from cache. :return: count of items removed )rÚexpirer!s rrQzDjangoCache.expire&s€ð Œ{×!Ò!Ñ#Ô#Ð#rcó:—|j ||¬¦«S)záReturn cache statistics hits and misses. :param bool enable: enable collecting statistics (default True) :param bool reset: reset hits and misses to 0 (default False) :return: (hits, misses) )ÚenableÚreset)rÚstats)rrSrTs rrUzDjangoCache.stats.s€ðŒ{× Ò ¨°eÐ Ñ<Ô<Ð.decorator..wrapper¨s·ø€ð,�gÔ+¨TÐ<°VÐ<Ð<�ØŸš #¥v¨w¸d˜ÑCÔC�à�VÐ#Ð#Ø!˜T 4Ð2¨6Ð2Ð2�Fà 4˜ð'Ø"¥oÒ5ð'à" Qš;ð"ð %ðØŸšØØ"Ø#Ø#Ø #Ø"&ð !ñôðð� rcó*•—t‰||‰‰¦«S)z,Make key for cache given function arguments.)r )rkrbÚbaseÚignoreÚtypeds €€€rrjz=DjangoCache.memoize..decorator..__cache_key__Ásø€å" 4¨¨v°u¸fÑEÔEÐEr)r rrj) rnrjrqrorrr%rr7rrsr.s ` @@€€€€€€€rÚ decoratorz&DjangoCache.memoize..decorator¤sšøøøø€à)-¨•I˜d‘O”OÐ%Ð%¸D¸7ˆDå �4‰[Œ[ð ð ð ð ð ð ð ð ð ñŒ[ð ð0 Fð Fð Fð Fð Fð Fð Fð%2ˆGÔ !؈Nr)ÚcallableÚ TypeError)rr%rr.rsr7rrrts``````` rÚmemoizezDjangoCache.memoizersiøøøøøøø€õ^ �D‰>Œ>ð 7ÝÐ5Ñ6Ô6Ð 6ð" ð" ð" ð" ð" ð" ð" ð" ð" ð" ð" ðHÐr)N)NNFFFF)NNFFT)NT)rNNT)TF) Ú__name__Ú __module__Ú __qualname__Ú__doc__rÚpropertyrr#r)r+rr2rr6r?rArCrErGrMrOrQrUrWrYr[r]r_rar1rwÚ __classcell__)rs@rr r sƒø€€€€€Ø7Ð7ð Ið Ið Ið Ið Iðð%ð%ñ„Xð%ð'ð'ð'ð6ð6ð6ð6ð'ð'ð'ð ØØ Ø ØðFðFðFðFðFØØ ØØ ØðLðLðLðLð: %ð %ð %ð %ð  ØØ Ø ØðFðFðFðFð:"1¸$Àdð6ð6ð6ð6ð(ØØØ ØðFðFðFðFð8 .ð .ð .ð .ðCðCðCðCð:?ð?ð?ð?ð8 "ð "ð "ð "ð$ð$ð$ð=ð=ð=ð=ð'ð'ð'ð%ð%ð%ð&ð&ð&ð"ð"ð"ð#ð#ð#ðððð +:ð 4ð 4ð 4ð 4ð ØØØØ ØðVðVðVðVðVðVðVðVrr N)r{Ú functoolsrÚdjango.core.cache.backends.baserrÚ ImportErrorÚcorerr r Úfanoutr r rfrrúrƒsÝðØ3Ð3àÐÐÐÐÐà5Ð5Ð5Ð5Ð5Ð5ðØ?Ð?Ð?Ð?Ð?Ð?Ð?øØðððà€O€O€Oðøøøð1Ð0Ð0Ð0Ð0Ð0Ð0Ð0Ð0Ð0ØÐÐÐÐÐðwðwðwðwðw�)ñwôwðwðwðws �—! !