plack / Plack-Middleware-Session

A very minimalist session library for Plack
Other
39 stars 28 forks source link

Add hooks to indicate whether a session should be given/updated #19

Open robrwo opened 10 years ago

robrwo commented 10 years ago

For websites, giving a session cookie and inserting/updating session data for every page hit is unnecessary, and even adds too much load for high traffic sites.

There should be a hook that tells the session state whether to send a cookie, and tells the session store whether the session should be created or updated. By default, these methods would always be true, but one should be able to set a flag to check the session for any actual changes.

miyagawa commented 10 years ago

https://metacpan.org/release/KAZEBURO/Plack-Middleware-Session-Simple-0.01exactly does that.

robrwo commented 10 years ago

@miyagawa Thanks. I'll take a look at it.