https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /usr/lib64/python2.7/site-packages/django/core/cache/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.7/site-packages/django/core/cache/__init__.pyc
�
r�\c@s
dZddlmZddlmZddlmZmZmZddl	m
Z
ddlmZddl
mZddlmZd	d
dgZidd6d
d
6dd6dd6dd6ZdZd�Zeejkr�e
de��nd�Zd�Zee�ZdS(s�
Caching framework.

This package defines set of cache backends that all conform to a simple API.
In a nutshell, a cache is a set of values -- which can be any object that
may be pickled -- identified by string keys.  For the complete API, see
the abstract BaseCache class in django.core.cache.backends.base.

Client code should not access a cache backend directly; instead it should
either use the "cache" variable made available here, or it should use the
get_cache() function made available here. get_cache() takes a backend URI
(e.g. "memcached://127.0.0.1:11211/") and returns an instance of a backend
cache class.

See docs/topics/cache.txt for information on the public API.
i����(tsettings(tsignals(tInvalidCacheBackendErrortCacheKeyWarningt	BaseCache(tImproperlyConfigured(t	importlib(timport_by_path(t	parse_qslt	get_cachetcachetDEFAULT_CACHE_ALIASt	memcachedtlocmemt	filebasedtfiletdbtdummytdefaultcCs�|jd�dkr$td��n|jdd�\}}|jd�sZtd��n|d}|jd�}|dkr�tt||d��}|d|!}ni}|jd�r�|d }n|||fS(	s�
    Converts the "backend_uri" into a cache scheme ('db', 'memcached', etc), a
    host and any extra params that are required for the backend. Returns a
    (scheme, host, params) tuple.
    t:i����s%Backend URI must start with scheme://is//it?t/(tfindRtsplitt
startswithtdictRtendswith(tbackend_uritschemetrestthosttqpostparams((s</tmp/pip-install-XxeQeY/django/django/core/cache/__init__.pytparse_backend_uri-s

sYou must define a '%s' cachecKs�tjj|d�}|dk	rh|j�}|j|�|jd�}|jdd�}|||fSyt|�}Wn)tk
r�}t	d||f��nX|jdd�}|||fSdS(sc
    Helper function to parse the backend configuration
    that doesn't use the URI notation.
    tBACKENDtLOCATIONtsCould not find backend '%s': %sN(
RtCACHEStgettNonetcopytupdatetpopRRR(tbackendtkwargstconftargstlocationtbackend_clste((s</tmp/pip-install-XxeQeY/django/django/core/cache/__init__.pytparse_backend_confHs

cKs�y�d|krit|�\}}}|tkrAdt|}n|j|�tj|�}|j}n$t||�\}}}t|�}Wn2tt	t
fk
r�}td||f��nX|||�}tj
j|j�|S(s*
    Function to load a cache backend dynamically. This is flexible by design
    to allow different use cases:

    To load a backend with the old URI-based notation::

        cache = get_cache('locmem://')

    To load a backend that is pre-defined in the settings::

        cache = get_cache('default')

    To load a backend with its dotted import path,
    including arbitrary options::

        cache = get_cache('django.core.cache.backends.memcached.MemcachedCache', **{
            'LOCATION': '127.0.0.1:11211', 'TIMEOUT': 30,
        })

    s://sdjango.core.cache.backends.%ssCould not find backend '%s': %s(R!tBACKENDSR)Rt
import_modulet
CacheClassR2RtAttributeErrortImportErrorRRRtrequest_finishedtconnecttclose(R+R,R/R tmodR0R1R
((s</tmp/pip-install-XxeQeY/django/django/core/cache/__init__.pyR	_s 
N(t__doc__tdjango.confRtdjango.coreRtdjango.core.cache.backends.baseRRRtdjango.core.exceptionsRtdjango.utilsRtdjango.utils.module_loadingRt#django.utils.six.moves.urllib.parseRt__all__R3RR!R%R2R	R
(((s</tmp/pip-install-XxeQeY/django/django/core/cache/__init__.pyt<module>s*
			+

https://t.me/AnonymousX5 - 2025