Skip to content

How to trigger eviction of LRU cache on my own #296

Answered by haowu14
dsaingre asked this question in Q&A
Discussion options

You must be logged in to vote

If you want to control what exactly to evict, you can extend the existing MMLru or replace it with your own implementation.
However, depending on what you mean by cache size, it may or maynot work for your purpose. Evicting an item does not free the memory space back to the operating system. If your goal is to free up space to the OS, you can do it via memory monitor: https://cachelib.org/docs/Cache_Library_User_Guides/oom_protection.
Similarly you can modify or use your own implementation there.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@dsaingre
Comment options

@haowu14
Comment options

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