Skip to content

Why are the most recently loaded users removed from the cache? #1822

Answered by ben-manes
ngtruongan84 asked this question in Q&A
Discussion options

You must be logged in to vote

You would need to simulate some cache activity for the recently users. Otherwise one-hit wonders can pollute an LRU cache, so more aggressive eviction of new entries helps in mru / lfu workloads. If there is no or uniform distribution of hits then the cache can’t make an intelligent choice and anything is reasonable. The learning policy tries to maximize the hit rate and doesn’t bias for recency if all else equal.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ben-manes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants