Interface CacheBinding<K,​V>

    • Method Detail

      • maximumWeight

        CacheBinding<K,​V> maximumWeight​(long weight)
        Set the total size of the cache.
      • expireAfterWrite

        CacheBinding<K,​V> expireAfterWrite​(Duration duration)
        Set the time an element lives after last write before being expired.
      • expireFromMemoryAfterAccess

        CacheBinding<K,​V> expireFromMemoryAfterAccess​(Duration duration)
        Set the time an element lives after last access before being expired.
      • refreshAfterWrite

        CacheBinding<K,​V> refreshAfterWrite​(Duration duration)
        Set the time that an element will be refreshed after. Elements older than this but younger than expireAfterWrite(Duration) will still be returned, but on access a task is queued to refresh their value asynchronously.
      • loader

        CacheBinding<K,​V> loader​(Class<? extends com.google.common.cache.CacheLoader<K,​V>> clazz)
        Populate the cache with items from the CacheLoader.
      • weigher

        CacheBinding<K,​V> weigher​(Class<? extends com.google.common.cache.Weigher<K,​V>> clazz)
        Algorithm to weigh an object with a method other than the unit weight 1.