Skip to content

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

Merged
bjohansebas merged 1 commit into
v2from
resave-option
Jul 3, 2025
Merged

feat: update default value of resave option to false#1064
bjohansebas merged 1 commit into
v2from
resave-option

Conversation

@bjohansebas

Copy link
Copy Markdown
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
Copy Markdown

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.

@bjohansebas
bjohansebas merged commit 4af1959 into v2 Jul 3, 2025
@bjohansebas
bjohansebas deleted the resave-option branch July 3, 2025 01:52
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