RejectedSoftware Forums

Sign up

redis session should or should not expire?

Not sure of the intention here, but it doesn't exactly suit my purposes.

If I use a redis backend for my session store, and set a timeout, then
the timeout removes the session based on the creation of the session,
regardless of further usage of the session.

That is, I login to my vibe.d instance. It creates a session. Let's say
the timeout is 120 seconds (to make things easy to demonstrate). I then
start using the session, navigating to different pages, downloading
different routes, etc. The session suddenly expires 120 seconds from the
initial login, and I have to log in again.

Is this the intended behavior? I would say no, that every time you
"open" a session (with SessionStore.open), it should re-up the timeout.
If this is the case, I can submit a PR.

If this is the intended behavior, is there a mechanism to re-up the
timeout manually besides opening my own redis connection and doing it?

-Steve

Re: redis session should or should not expire?

On 6/9/17 9:09 AM, Steven Schveighoffer wrote:

Is this the intended behavior? I would say no, that every time you
"open" a session (with SessionStore.open), it should re-up the timeout.
If this is the case, I can submit a PR.

Followup:

I copied the vibe.d RedisSessionStore into my project and made the
update. Works exactly like I need it to. I will submit the PR.

-Steve