heycarsten/boffin — pull request #5 by elucid (2014-02-10 06:11:45+00:00)
Title: Allow users to optionally set expiry for hit counts

While all of the interval aggregate keys have their TTLs updated on each write, per-session and overall hit counts are persistent. However, it would be nice to be able to specify TTLs for these as well so that a) you don't need to maintain the counts if you don't use them and b) even if they are used you can avoid keeping them around forever to save memory.

In order to maintain backwards compatibility this PR preserves the prior behaviour by default. That is, hits and hit_count keys never expire unless you explicitly specify `hits_window_secs` and/or `hit_count_window_secs` in your config.

A notable disadvantage of this approach is that it makes the config defaults inconsistent: providing nil for one of the other four config expiry options results in a non-nil default while the new options default to nil (e.g. don't expire) and only expire if you set something.

For this reason I haven't updated the `README.md`.