[concurrency-interest] Memory sensitive memoization

Doug Lea dl at cs.oswego.edu
Mon Jun 27 12:57:04 EDT 2011

On 06/27/11 11:47, Blair Zajac wrote:
>> Yes. A "Cache" is basically an enhanced concurrent map with an expiration
>> policy. There are enough possibilities for how to expose and support
>> expiration to have led us to stall for years on releasing one. We will
>> revisit this for jdk8. In the mean time, guava MapMaker is a reasonable
>> choice for many usages.
> As MapMaker has recently added support for specifying a maximum cache size
> and a #expireAfterAccess() method, are there other missing features you would
> want to see in jdk8?

Among other issues:
*  Should strict LRU be supported? (This can hurt scalability)
*  Should eviction (optionally?) be handled by a dedicated thread?
     (faster if extra cores are available, but unpredictable on
     overloaded systems)
* Are policies expressed via explicit weights? (requires a
   user defined weighting function)
* Should the API be compatible with JSR107?


More information about the Concurrency-interest mailing list