Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

disable auto session save with flag. #766

Closed
ohemmi opened this Issue Mar 22, 2013 · 1 comment

Comments

Projects
None yet
2 participants

ohemmi commented Mar 22, 2013

Can we have a flag for disabling the auto-save all sessions on request end?
For long polling or really really async servers this can cause data inconsistency.
We added it to our project the line below is all we changed.

lib/middleware/session.js line 277

if ((!req.session) || (!options.noSaveOnEnd)) return res.end(data, encoding);
Member

tj commented Apr 1, 2013

the hashing should pretty much take care of this, if you dont change the session data during those requests it shouldn't save

@tj tj closed this Apr 1, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment