It seems when using the Session with tide's session middleware, it's not possible to modify the session expiry because it is not wrapped in an Arc (I think).
This can be a somewhat tricky thing to reason with because of the session lifecycle in a request (and how it is cloned), but testing reveals that there are two things that would prevent this:
- the expiry not being wrapped in
Arc so the cloned session (via tide session middleware's handler) does not update the session expiry
Session::expire_in does not mark the session data_changed, so unless the check is disabled in the middleware, changes to session expiry will not cause the session to be updated by the store even it 1 is fixed
These are relatively straightforwards things to resolve, but may have some more subtle implications since it will change how sessions behave and existing code may be out there which depends on these quirks.
It seems when using the
Sessionwith tide's session middleware, it's not possible to modify the session expiry because it is not wrapped in anArc(I think).This can be a somewhat tricky thing to reason with because of the session lifecycle in a request (and how it is cloned), but testing reveals that there are two things that would prevent this:
Arcso the cloned session (via tide session middleware's handler) does not update the session expirySession::expire_indoes not mark the sessiondata_changed, so unless the check is disabled in the middleware, changes to session expiry will not cause the session to be updated by the store even it 1 is fixedThese are relatively straightforwards things to resolve, but may have some more subtle implications since it will change how sessions behave and existing code may be out there which depends on these quirks.