I need something like a bounded queue where I can only insert say 10 elements. A new element should override the last inserted element. There should be only n distinct elements
I am looking for suggestions in Java by the way.
ITYM an implementation of a LRU algorithm.
How to set up a simple LRU cache using LinkedHashMap
Simple LRU Caching with Expiration
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With