|
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 : /lib64/python2.7/site-packages/django/core/cache/ |
Upload File : |
�
r�\c @ s
d Z d d l m Z d d l m Z d d l m Z m Z m Z d d l m
Z
d d l m Z d d l
m Z d d l m Z d d
d g Z i d d 6d
d
6d d 6d d 6d d 6Z d Z d � Z e e j k r� e
d e � � n d � Z d � Z e e � Z d S( 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����( t settings( t signals( t InvalidCacheBackendErrort CacheKeyWarningt BaseCache( t ImproperlyConfigured( t importlib( t import_by_path( t parse_qslt get_cachet cachet DEFAULT_CACHE_ALIASt memcachedt locmemt filebasedt filet dbt dummyt defaultc C s� | j d � d k r$ t d � � n | j d d � \ } } | j d � sZ t d � � n | d } | j d � } | d k r� t t | | d � � } | d | !} n i } | j d � r� | d } n | | | f S( 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://i s //i t ?t /( t findR t splitt
startswitht dictR t endswith( t backend_urit schemet restt hostt qpost params( ( s<