Class SafeCaches

    • Method Detail

      • buildNonEvictableCache

        public static <K,​V> NonEvictableCache<K,​V> buildNonEvictableCache​(com.google.common.cache.CacheBuilder<? super K,​? super V> cacheBuilder)
      • buildNonEvictableCacheWithWeakInvalidateAll

        public static <K,​V> NonKeyEvictableCache<K,​V> buildNonEvictableCacheWithWeakInvalidateAll​(com.google.common.cache.CacheBuilder<? super K,​? super V> cacheBuilder)
        Builds a cache that supports Cache.invalidateAll() with best-effort semantics: there is no guarantee that cache is empty after invalidateAll() returns, or that subsequent read will not see stale state.
      • buildNonEvictableCache

        public static <K,​V> NonEvictableLoadingCache<K,​V> buildNonEvictableCache​(com.google.common.cache.CacheBuilder<? super K,​? super V> cacheBuilder,
                                                                                             com.google.common.cache.CacheLoader<? super K,​V> cacheLoader)
      • buildNonEvictableCacheWithWeakInvalidateAll

        public static <K,​V> NonKeyEvictableLoadingCache<K,​V> buildNonEvictableCacheWithWeakInvalidateAll​(com.google.common.cache.CacheBuilder<? super K,​? super V> cacheBuilder,
                                                                                                                     com.google.common.cache.CacheLoader<? super K,​V> cacheLoader)
        Builds a cache that supports Cache.invalidateAll() with best-effort semantics: there is no guarantee that cache is empty after invalidateAll() returns, or that subsequent read will not see stale state.