1

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?

Shvalb
  • 1,835
  • 2
  • 30
  • 60

1 Answers1

1

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).

mfulton26
  • 29,956
  • 6
  • 64
  • 88