Package com.google.common.cache
@CheckReturnValue
@NullMarked
package com.google.common.cache
Discouraged (in favor of Caffeine) caching utilities.
The core interface used to represent caches is Cache. In-memory caches can be
configured and created using CacheBuilder, with cache entries being loaded by CacheLoader. Statistics about cache performance are exposed using CacheStats.
See the Guava User Guide article on caches.
This package is a part of the open-source Guava library.
- Author:
- Charles Fry
-
ClassDescriptionAbstractCache<K,
V> This class provides a skeletal implementation of theCacheinterface to minimize the effort required to implement this interface.A thread-safeAbstractCache.StatsCounterimplementation for use byCacheimplementors.Accumulates statistics during the operation of aCachefor presentation byCache.stats().AbstractLoadingCache<K,V> This class provides a skeletal implementation of theCacheinterface to minimize the effort required to implement this interface.Cache<K,V> A semi-persistent mapping from keys to values.CacheBuilder<K,V> A builder ofLoadingCacheandCacheinstances.A specification of aCacheBuilderconfiguration.CacheLoader<K,V> Computes or retrieves values, based on a key, for use in populating aLoadingCache.Thrown to indicate that an invalid response was returned from a call toCacheLoader.Exception thrown byloadAll()to indicate that it is not supported.Statistics about the performance of aCache.ForwardingCache<K,V> A cache which forwards all its method calls to another cache.A simplified version ofForwardingCachewhere subclasses can pass in an already constructedCacheas the delegate.A cache which forwards all its method calls to another cache.A simplified version ofForwardingLoadingCachewhere subclasses can pass in an already constructedLoadingCacheas the delegate.LoadingCache<K,V> A semi-persistent mapping from keys to values.The reason why a cached entry was removed.RemovalListener<K,V> An object that can receive a notification when an entry is removed from a cache.A collection of common removal listeners.RemovalNotification<K,V> A notification of the removal of a single entry.Weigher<K,V> Calculates the weights of cache entries.