Skip to content
Discussion options

You must be logged in to vote

Hi. Unfortunately, we cannot check if an entry was truly inserted when using the TinyLFU policy.

With the TinyLFU policy, the cache works as follows:

  • The insert method always inserts the entry into the cache, even if the cache is full.
  • There is no way to know if the entry will soon be rejected by the LFU filter, or if it will be accepted and kept for a while.
  • When the maintenance task is implicitly or explicitly processed, the LFU filter will decide whether to accept or reject the entry.
    • If the entry's popularity is higher then the LRU entry's popularity, the entry will be accepted.
  • When an entry is removed from the cache, the eviction listener is called.
    • As of moka@v0.12.x, the remo…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ChillFish8
Comment options

Answer selected by ChillFish8
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