MCPcopy
hub / github.com/django/django / CacheHandler

Class CacheHandler

django/core/cache/__init__.py:39–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37
38
39class CacheHandler(BaseConnectionHandler):
40 settings_name = "CACHES"
41 exception_class = InvalidCacheBackendError
42
43 def create_connection(self, alias):
44 params = self.settings[alias].copy()
45 backend = params.pop("BACKEND")
46 location = params.pop("LOCATION", "")
47 try:
48 backend_cls = import_string(backend)
49 except ImportError as e:
50 raise InvalidCacheBackendError(
51 "Could not find backend '%s': %s" % (backend, e)
52 ) from e
53 return backend_cls(location, params)
54
55
56caches = CacheHandler()

Callers 3

test_allMethod · 0.90
__init__.pyFile · 0.85

Calls

no outgoing calls

Tested by 2

test_allMethod · 0.72