Skip to content
Discussion options

You must be logged in to vote

You should probably revert back to Guava if your business logic depends on LRU eviction order. Caffeine's policy is adaptive to maximize the hit rate and initially starts in an LFU configuration and will find the optimal LRU-LFU setting at runtime. We don't want to make promises on eviction order and only allow constraints on the overall behavior to fit your size/time/etc settings. How we do that is implementation details that could change. Typically if required by business logic then this should be very explicit, or else it is often mistaken preferences that don't fit the actual data. If this is just a nice to have then you should rely on our adaption to tune itself.

The closest knob we …

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