Closed mahovich closed 5 years ago
@mahovich thanks for your issue, and that's a pretty good idea. But I can not agree that the update
action should be only when calling refresh
. I think it should be automatic when the session is changed.
so I think the cookie should be updated only when the session id is changed. It seems smarter than now. What do you think? 😄
I forgot about changing the session identifier - I did not use it on my projects... I'll make a change now.
And one more question:
the cookie should be updated only when the session id is changed
refresh()
after all remains? You do not want to give it up?
@mahovich It looks great! Thanks for your contribution, I will merge it. 😄
When you add or update the contents of the session, there is an unnecessary update of the session, for example:
will create an http request with a cookie update (session).
In my opinion - this is a mistake, because session update should be performed only when calling
ctx.session.refresh()
.The current session behavior causes a lot of unnecessary session updates for any request to the engine, if, for example, with each request, it changes values such as
ctx.session.last_requests
orctx.session.count_views_page
.