title: Do Guava caches consider weight in eviction choices?
body: <p>The latest version of the excellent Guava library has updated the caching apis.  CacheBuilder now has a maxmimumWeight() method to enforce a maximum weight over the cache.  The javadoc states:</p>
  
  <blockquote>
    <p>Specifies the maximum weight of entries the cache may contain. Weight
    is determined using the Weigher specified with weigher, and use of
    this method requires a corresponding call to weigher prior to calling
    build(com.google.common.cache.CacheLoader).</p>
    
    <p>Note that the cache may evict an entry before this limit is exceeded.
    As the cache size grows close to the maximum, the cache evicts entries
    that are less likely to be used again. For example, the cache may
    evict an entry because it hasn't been used recently or very often.</p>
  </blockquote>
  
  <p>When the Cache needs to evict an entry, will it consider the weights?  For example, it may be better to keep several entries of small weight than one entry of large weight, if the large weight entry is used more often than any small item, but less often than all of the small items together.</p>