Skip to content

Commit

Permalink
don't let redis evict sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
pefoley2 committed Mar 19, 2016
1 parent 37d0692 commit 515c2f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion intranet/settings/__init__.py
Expand Up @@ -330,7 +330,8 @@ def get_month_seconds():
SESSION_REDIS_DB = 0
SESSION_REDIS_PREFIX = VIRTUAL_ENV + ":session"

SESSION_COOKIE_AGE = int(datetime.timedelta(hours=2).total_seconds())
# No TTL means redis doesn't evict sessions in low memory situations.
SESSION_COOKIE_AGE = None # type: int
SESSION_SAVE_EVERY_REQUEST = True

CACHES = {
Expand Down

0 comments on commit 515c2f3

Please sign in to comment.