Top Description Fields Constructors Methods
org.springframework.cache.support

public Class SimpleCacheManager

extends AbstractCacheManager
Class Inheritance
Imports
java.util.Collection, .Collections, org.springframework.cache.Cache

Simple cache manager working against a given collection of caches. Useful for testing or simple caching declarations.

When using this implementation directly, i.e. not via a regular bean registration, initializeCaches() should be invoked to initialize its internal state once the caches have been provided.

Author
Costin Leau
Since
3.1
See Also
NoOpCache, org.springframework.cache.concurrent.ConcurrentMapCache

Field Summary

Modifier and TypeField and Description
private Collection<? extends Cache>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected Collection<? extends Cache>
loadCaches()

Implements abstract org.springframework.cache.support.AbstractCacheManager.loadCaches.

Load the initial caches for this cache manager.
public void
setCaches(Collection<? extends Cache> caches)

Specify the collection of Cache instances to use for this CacheManager.

Inherited from org.springframework.cache.support.AbstractCacheManager:
afterPropertiesSetdecorateCachegetCachegetCacheNamesgetMissingCacheinitializeCacheslookupCache

Field Detail

cachesback to summary
private Collection<? extends Cache> caches

Constructor Detail

SimpleCacheManagerback to summary
public SimpleCacheManager()

Method Detail

loadCachesback to summary
protected Collection<? extends Cache> loadCaches()

Implements abstract org.springframework.cache.support.AbstractCacheManager.loadCaches.

Doc from org.springframework.cache.support.AbstractCacheManager.loadCaches.

Load the initial caches for this cache manager.

Called by afterPropertiesSet() on startup. The returned collection may be empty but must not be null.

Annotations
@Override
setCachesback to summary
public void setCaches(Collection<? extends Cache> caches)

Specify the collection of Cache instances to use for this CacheManager.

See Also
initializeCaches()