Top Description Methods
org.springframework.cache

public Interface CacheManager

Known Direct Implementers
org.springframework.cache.concurrent.ConcurrentMapCacheManager, org.springframework.cache.support.AbstractCacheManager, org.springframework.cache.support.CompositeCacheManager, org.springframework.cache.support.NoOpCacheManager
Imports
java.util.Collection, org.springframework.lang.Nullable

Spring's central cache manager SPI.

Allows for retrieving named Cache regions.

Authors
Costin Leau, Sam Brannen
Since
3.1

Method Summary

Modifier and TypeMethod and Description
public Cache

Returns:

the associated cache, or null if such a cache does not exist or could be not created
getCache
(String
the cache identifier (must not be null)
name
)

Get the cache associated with the given name.

public Collection<String>

Returns:

the names of all caches known by the cache manager
getCacheNames
()

Get a collection of the cache names known by this manager.

Method Detail

getCacheback to summary
public Cache getCache(String name)

Get the cache associated with the given name.

Note that the cache may be lazily created at runtime if the native provider supports it.

Parameters
name:String

the cache identifier (must not be null)

Returns:Cache

the associated cache, or null if such a cache does not exist or could be not created

Annotations
@Nullable
getCacheNamesback to summary
public Collection<String> getCacheNames()

Get a collection of the cache names known by this manager.

Returns:Collection<String>

the names of all caches known by the cache manager