-
-
Notifications
You must be signed in to change notification settings - Fork 570
Allow disable of Session saver #1885
Comments
I have this working in a fork I made, required a few additional changes to only save flash state if changed. It dose mean you have to explicitly call I will open a PR for review / feedback. |
This is a big breaking change, a PR probably wouldn’t be accepted, sorry. An option would be to open a PR that is smarter about saving sessions, and only writing them when necessary. Another would be to expose the session saving middleware, that people, such as yourself, can remove it from the middleware stack and write their own. |
Sorry if not clear, my PR would be to add a option to disable the middleware, I was not planning to disable it totally. So behaviour would be unchanged by default. Simular to how if you don't pass a logger instance one is created for you. I had thought about a change tracking aproach, but decided to explore explicit saving first. |
We are trying to move away from adding more options, in favor of a plugin design pattern, so we wouldn't accept a PR that adds a new option at this time. My recommendation is a simple |
Hello, the session save was made none optional in 3c8d9cb.
But this means with the default session store you send a new cookie with every response even if you change nothing, bloating responses and expire keeps moving forward.
This also makes Redis backed session stores very chatty.
I would like to request this middleware is made optional again.
Thanks.
The text was updated successfully, but these errors were encountered: