Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Cleanup of stale cache entries #6

Open
joeytwiddle opened this issue Sep 11, 2013 · 0 comments
Open

Cleanup of stale cache entries #6

joeytwiddle opened this issue Sep 11, 2013 · 0 comments
Labels

Comments

@joeytwiddle
Copy link

joeytwiddle commented Sep 11, 2013

Just a placeholder to discuss this feature. :)

A metric I used in the past to order cache entries for cleanup was:

timeSinceLastHit / (numberOfTimesHit + 1)

So entries which are hit twice as often will take twice as long to expire. (The +1 just avoids division by zero, if we don't record the creation of the cache entry as a "hit".)

Although for this project, a fixed timeout like "1 month old" for the disk-cache might be simpler, and avoid having to record hit statistics. "1 month unused" might be better, but we would need to record the last hit time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants