MCPcopy
hub / github.com/django/django / load

Method load

django/contrib/sessions/backends/cache.py:26–36  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

24 return self.cache_key_prefix + await self._aget_or_create_session_key()
25
26 def load(self):
27 try:
28 session_data = self._cache.get(self.cache_key)
29 except Exception:
30 # Some backends (e.g. memcache) raise an exception on invalid
31 # cache keys. If this happens, reset the session. See #17810.
32 session_data = None
33 if session_data is not None:
34 return session_data
35 self._session_key = None
36 return {}
37
38 async def aload(self):
39 try:

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected