It seems to me (after looking into the TTL value of the session in Redis while browsing the Django webapp) that the session expiry is never extended on access. This means that the user is logged out from their session after the value specified in the settings (settings.SESSION_COOKIE_AGE) regardless of how active they have been during that time. They will loose any changes on the page, e.g. in a form, if they have been working on something when that TTL ends.
This pull requests simply extends the TTL on each call of redis_sessions.SessionStore.load() if the _session_key is not None (the session exists already).
Maybe there is a better way to achieve this?
There is an older issue #40 about this but with no solution.
It seems to me (after looking into the TTL value of the session in Redis while browsing the Django webapp) that the session expiry is never extended on access. This means that the user is logged out from their session after the value specified in the settings (
settings.SESSION_COOKIE_AGE
) regardless of how active they have been during that time. They will loose any changes on the page, e.g. in a form, if they have been working on something when that TTL ends.This pull requests simply extends the TTL on each call of
redis_sessions.SessionStore.load()
if the_session_key
is notNone
(the session exists already).Maybe there is a better way to achieve this?
There is an older issue #40 about this but with no solution.