I'm looking for a Cache facility that can remove old entries if predefined interval expires (Like Guava Cache) but internally uses a NavigableMap interface.
Is there something like that?
I'm looking for a Cache facility that can remove old entries if predefined interval expires (Like Guava Cache) but internally uses a NavigableMap interface.
Is there something like that?
I do not believe there is something like that but you could use a ConcurrentSkipListMap<K,V>
directly as a cache (see NavigableMap & time-based caches for an example) or keep a NavigableMap<K,V>
in sync with a Guava Cache by loading/putting to both the cache and the navigable map and using a RemovalListener<K,V>
to remove entries from the navigable map when they are removed from the cache (see Removal Listeners).