
Optimization for updating "last_request_at"
Reported by Georg Ledermann | November 10th, 2008 @ 09:26 AM
Currently, the field "last_request_at" is updated on every single request. What do you think about some kind of optimization by adding a latency time?
Example: Update the "last_request_at" only if the last update is more than 2 minutes ago. The 2 minutes should be a config option.
This would prevent lots of updates to the database if a user produces a lot of requests in a short time.
Of course, with this feature the value "last_request_at" gets a little bit vague, but I don't think this matters. People who don't like this may set the config option to 0.minutes, which would be the current behaviour (means updating the timestamp on every single request).
Comments and changes to this ticket
-
Ben Johnson November 10th, 2008 @ 11:39 AM
- State changed from new to open
I think thats fine, it really depends on how you are using it. I'll add that in.
-
Ben Johnson November 10th, 2008 @ 03:53 PM
- State changed from open to resolved
This is added, I added the last_request_at_threshold config option.
-
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Object based authentication solution that handles all of the non sense for you. It's as easy as ActiveRecord is with a database.