Original issue created by shtratos on 2014-03-06 at 08:45 AM
Here: https://google.github.io/guava/apidocs/com/google/common/cache/CacheBuilder.html#weigher(com.google.common.cache.Weigher)
maximumWeight() javadoc says:
... When weight is zero, elements will be evicted immediately after being loaded into cache.
Note that weight is only used to determine whether the cache is over capacity; it has no effect on selecting which entry should be evicted next. ...
Which contradicts to weigher() javadoc:
... Entry weight is taken into consideration by maximumWeight(long) when determining which entries to evict, ...
When the weight of an entry is zero it will not be considered for size-based eviction (though it still may be evicted by other means).
Original issue created by shtratos on 2014-03-06 at 08:45 AM
Here: https://google.github.io/guava/apidocs/com/google/common/cache/CacheBuilder.html#weigher(com.google.common.cache.Weigher)
maximumWeight() javadoc says:
... When weight is zero, elements will be evicted immediately after being loaded into cache.
Note that weight is only used to determine whether the cache is over capacity; it has no effect on selecting which entry should be evicted next. ...
Which contradicts to weigher() javadoc:
... Entry weight is taken into consideration by maximumWeight(long) when determining which entries to evict, ...
When the weight of an entry is zero it will not be considered for size-based eviction (though it still may be evicted by other means).