Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow specification of whether to store blank sessions #75

Merged
merged 2 commits into from Sep 9, 2015

Conversation

@connor4312
Copy link
Contributor

connor4312 commented Jun 5, 2015

We've been using Yar for sessions, and storing sessions in Redis. Over time, a very large number of entirely empty sessions have accumulated; these are created on requests with authentication is optional, which in our case is the majority of routes.

This PRs adds an option, storeBlank which simply sets the initial _isModified property, which causes new sessions that are not changed to not be persisted or sent down in the set-cookie. It defaults to true - which is the current behaviour of the library - so no breaking change is introduced.

@hueniverse hueniverse added the feature label Jun 5, 2015
@mark-bradshaw mark-bradshaw self-assigned this Sep 9, 2015
@mark-bradshaw mark-bradshaw added this to the 4.2.0 milestone Sep 9, 2015
@mark-bradshaw mark-bradshaw merged commit d10747c into hapijs:master Sep 9, 2015
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.