(self)
| 51 | return data |
| 52 | |
| 53 | async def aload(self): |
| 54 | try: |
| 55 | data = await self._cache.aget(await self.acache_key()) |
| 56 | except Exception: |
| 57 | # Some backends (e.g. memcache) raise an exception on invalid |
| 58 | # cache keys. If this happens, reset the session. See #17810. |
| 59 | data = None |
| 60 | |
| 61 | if data is None: |
| 62 | s = await self._aget_session_from_db() |
| 63 | if s: |
| 64 | data = self.decode(s.session_data) |
| 65 | await self._cache.aset( |
| 66 | await self.acache_key(), |
| 67 | data, |
| 68 | await self.aget_expiry_age(expiry=s.expire_date), |
| 69 | ) |
| 70 | else: |
| 71 | data = {} |
| 72 | return data |
| 73 | |
| 74 | def exists(self, session_key): |
| 75 | return ( |
nothing calls this directly
no test coverage detected