express-mysql-session icon indicating copy to clipboard operation
express-mysql-session copied to clipboard

resave session on each request even if resave is set to false

Open ragesoft opened this issue 2 years ago • 2 comments

Hi there,

in the main modul for express sessions ( https://github.com/expressjs/session ) there is an issue for "resave" config. https://github.com/expressjs/session/issues/891

Maybe it is possible to work around this behavior in this store here? I see in my sql query log on every client requests 2 sql queries (SELECT and UPDATE) for each client session...

Do you have any idea how to limit this? Like successed by the issue owner in the linked issue (max-age 80% => resave) :)

Greetings

ragesoft avatar May 20 '22 12:05 ragesoft

@ragesoft This is what I ended up using: https://github.com/chill117/express-mysql-session/pull/133

mmilleruva avatar Aug 18 '22 18:08 mmilleruva

The latest version of this module includes a new option "disableTouch" which could help - also implemented by @mmilleruva in the referenced pull-request above.

chill117 avatar Mar 16 '23 16:03 chill117