You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Community has raised need for having easier way to sync session state with storage.
Background
Currently session middleware is only responsible for reading data from store and initiating session in request scope. In turn it is not responsible for writing updated session back into session store. State persistence needs to be dona manually through manual use of SessionStore.
Options
Two potential options have been named:
separate write middleware that detects session state change and performs state dump into session store
extensions to existing middleware that utilises response hooks and performs state dump into session store just before response flow is about to end - based on how express session module works
Second one is preferred cause it offers all-in-one solution which does not require other application middlewares to be mindful of session writing middleware to not break the middleware invocation chain.
The text was updated successfully, but these errors were encountered:
DamianDunajski
changed the title
Convenient way to dump session state to Redis database [DRAFT]
Convenient way to dump session state to Redis database
Apr 22, 2020
Community has raised need for having easier way to sync session state with storage.
Background
Currently session middleware is only responsible for reading data from store and initiating session in request scope. In turn it is not responsible for writing updated session back into session store. State persistence needs to be dona manually through manual use of
SessionStore
.Options
Two potential options have been named:
separate write middleware that detects session state change and performs state dump into session store
extensions to existing middleware that utilises response hooks and performs state dump into session store just before response flow is about to end - based on how express session module works
Second one is preferred cause it offers all-in-one solution which does not require other application middlewares to be mindful of session writing middleware to not break the middleware invocation chain.
The text was updated successfully, but these errors were encountered: