MCPcopy
hub / github.com/django/django / asave

Method asave

django/contrib/sessions/backends/cached_db.py:95–104  ·  view source on GitHub ↗
(self, must_create=False)

Source from the content-addressed store, hash-verified

93 logger.exception("Error saving to cache (%s)", self._cache)
94
95 async def asave(self, must_create=False):
96 await super().asave(must_create)
97 try:
98 await self._cache.aset(
99 await self.acache_key(),
100 self._session,
101 await self.aget_expiry_age(),
102 )
103 except Exception:
104 logger.exception("Error saving to cache (%s)", self._cache)
105
106 def delete(self, session_key=None):
107 super().delete(session_key)

Callers

nothing calls this directly

Calls 3

acache_keyMethod · 0.95
aget_expiry_ageMethod · 0.80
asetMethod · 0.45

Tested by

no test coverage detected