21 | | cache.set(self.session_key, data, settings.SESSION_COOKIE_AGE) |
| 23 | expires = settings.SESSION_COOKIE_AGE |
| 24 | # Memcached needs a unix timestamp for expiry values greater than 2592000. |
| 25 | if settings.CACHE_BACKEND.lower().startswith('memcached') and expires > 2592000: |
| 26 | cache.set(self.session_key, data, int(time.time()) + settings.SESSION_COOKIE_AGE) |
| 27 | else: |
| 28 | cache.set(self.session_key, data, settings.SESSION_COOKIE_AGE) |
29 | | cache.set(self.session_key, self._session, settings.SESSION_COOKIE_AGE) |
| 36 | expires = settings.SESSION_COOKIE_AGE |
| 37 | # Memcached needs a unix timestamp for expiry values greater than 2592000. |
| 38 | if settings.CACHE_BACKEND.lower().startswith('memcached') and expires > 2592000: |
| 39 | cache.set(self.session_key, self._session, int(time.time()) + settings.SESSION_COOKIE_AGE) |
| 40 | else: |
| 41 | cache.set(self.session_key, self._session, settings.SESSION_COOKIE_AGE) |