Any Java caches that can limit memory usage of in-memory cache, not just instance count?

后端 未结 8 2490
后悔当初
后悔当初 2021-02-14 00:08

I am looking for a simple in-memory (and in-process) cache for short-term caching of query data (but short-term meaning beyond request/response, i.e. session boundary). EhCache

8条回答
  •  日久生厌
    2021-02-14 00:52

    If you cannot make any estimations - write a cache eviction policy which flushes based on the JVM heap size (polled from System) or triggered by a finalize()-call from an orphaned object (on GC).

提交回复
热议问题