Skip to content

feat: update default value of resave option to false #1064

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

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from

Conversation

bjohansebas
Copy link
Member

I think it's better to set it to false instead of making this field required.

@UlisesGascon @raphendyr WDYT?

…eware

Signed-off-by: Sebastian Beltran <bjohansebas@gmail.com>
@raphendyr
Copy link

I think this is likely good. Kind of safe default settings are better than mandatory values in my mind.

I don't remember what I thought about this before. Saving the session often is really problematic due to race condition as stated in the doc:

Depending on your store this may be necessary, but it can also create race conditions where a client makes two parallel requests to your server and changes made to the session in one request may get overwritten when the other request ends

It could be possible that this setting should be removed, and if the store needs this, it should implement a "fake" .touch() method, which would do the resave. However, that would be a change in the current interaction and thus would take time. Hence, I believe we need to keep this setting for now.

p.s. Sorry, I have had other priorities, thus I haven't had the time I wanted for this project.

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

Successfully merging this pull request may close these issues.

3 participants