Cache
for presentation by
Cache.stats()
.
Cache
interface to minimize the effort required to implement this interface.
AbstractCache.StatsCounter
implementation for use by
Cache
implementors.
Cache
interface to minimize the effort required to implement this interface.
LoadingCache
and
Cache
instances having any combination of the following features: automatic loading of entries into the cache least-recently-used eviction when a maximum size is exceeded time-based expiration of entries, measured since last access or last write keys automatically wrapped in
weak references values automatically wrapped in
weak or
soft references notification of evicted (or otherwise removed) entries accumulation of cache access statistics
CacheBuilder
configuration.
LoadingCache
.
Cache
.
ForwardingCache
where subclasses can pass in an already constructed
Cache
as the delegate.
ForwardingLoadingCache
where subclasses can pass in an already constructed
LoadingCache
as the delegate.
CacheLoader
.
loadAll()
to indicate that it is not supported.
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 libraries.