Closed svdo closed 1 year ago
@svdo Thanks Stefan! Will look at merging next time I'm doing some batched work on Carmine.
Just a heads-up that this part of your understanding isn't accurate:
When false, the session expiration will be set when it is created (and not changed afterwards)
When false, the session is also renewed on any session writes (changes).
I.e. the extend-on-read?
options would be:
false
(default): renew session only on session writestrue
: renew session also on session readsHope that makes sense!
Yes I understand, thanks for clarifying!!
@svdo Will be merged in next release, thanks Stefan! Apologies for the long delay.
No problem at all @ptaoussanis, I've been using my fork so that didn't cause any issues for me :)
This change introduces a new option
:extend-on-read?
to the Ring middleware. By default it isfalse
. Whenfalse
, the session expiration will be set when it is created(and not changed afterwards)and when it is written (which normally doesn't happen when using the ring-session middleware). Whentrue
the session expiration is reset on every read, so that the session is always valid for the set number of seconds after it was last used.Updated pull request for #259.