-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Touch Interval Rate #32
Comments
Another use case is when a website only saves session data for the user and doesn't track http request statistics. That session should be gotten once via |
This code I suggested is theory - a number of things wrong with it. I've dug into the actual source to get a working example. Apologies around for my naiveté - part of the learning process with a new repo. I'll post a link here when I have s/thing. |
I have a working version of TouchWithInterval in a forked repo. From the commit history, you can see there are two underlying issues that needed to be addressed first. Just initiated a pull request for these. |
That's exactly the point of My instinct is that for something as critical as session data and timeouts, While I understand that there's perfomance drawbacks of this, it's the tradeoff for having an accurate and exact |
WRT to the point about calling |
Thank you for the detailed explanation on Touch. That helps settle some of my thoughts. I now see where my confusion comes from. I like that you placed the Exposing I think this issue can be closed. I'm going to open up two new ones to discuss other ideas. Thanks for your help on this! |
Looking for some feedback on whether or not this is a good idea. I'd like finer control of Touch(). Why? For a high-volume site, each Touch is a new update to deadline and therefore a new write to the data store. While some handlers will always uses sessions others will not, such as serving static files. Admittedly there are other ways to design this. For example in middleware, I could skip calling Touch for any path serving static files. But a few seconds delay in Touch would serve the same purpose. (And for those static files, I'm still updating global statistics - just not session stats on the static files - which I'm not tracking.)
What if there was a TouchIntervalRate to control how often the deadline gets updated via touch? It could manifest itself a few ways. Arguably the easiest is a new function,
session.TouchWithInterval()
.Thoughts?
The text was updated successfully, but these errors were encountered: