Package org.springframework.cache
Interface CacheManager
- All Known Implementing Classes:
AbstractCacheManager,AbstractTransactionSupportingCacheManager,CaffeineCacheManager,CompositeCacheManager,ConcurrentMapCacheManager,EhCacheCacheManager,GuavaCacheManager,JCacheCacheManager,NoOpCacheManager,SimpleCacheManager,TransactionAwareCacheManagerProxy
public interface CacheManager
Spring's central cache manager SPI.Allows for retrieving named
Cacheregions.- Since:
- 3.1
- Author:
- Costin Leau, Sam Brannen
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CachegetCache(String name)Get the cache associated with the given name.Collection<String>getCacheNames()Get a collection of the cache names known by this manager.
Method Detail
getCache
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- the cache identifier (must not benull)- Returns:
- the associated cache, or
nullif such a cache does not exist or could be not created
getCacheNames
Collection<String> getCacheNames()
Get a collection of the cache names known by this manager.- Returns:
- the names of all caches known by the cache manager