Package org.springframework.cache
Interface CacheManager
- All Known Implementing Classes:
AbstractCacheManager,AbstractTransactionSupportingCacheManager,CaffeineCacheManager,CompositeCacheManager,ConcurrentMapCacheManager,JCacheCacheManager,NoOpCacheManager,SimpleCacheManager,TransactionAwareCacheManagerProxy
public interface CacheManager
Spring's central cache manager SPI.
Allows for retrieving named Cache regions.
- Since:
- 3.1
- Author:
- Costin Leau, Sam Brannen
-
Method Summary
Modifier and TypeMethodDescriptionGet the cache associated with the given name.Get a collection of the cache names known by this manager.
-
Method Details
-
getCache
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
-