I would like to know if there is currently a way with Guava MapMaker or will be a way with CacheBuilder, to provide a function to compute whether the cache is within the maximum size?
It looks as though currently eviction is based simply on the number of elements in the cache compared to the .maximumSize() value, however I want to use the resulting map as a cache for bitmaps which could contain either very small or very large entries. Consequently I would like to be able to provide a function which computes the cache size based on the amount of memory entries are using and then allows the cache to evict on the basis of this.