接口 CacheManager
- 所有已知实现类:
AbstractCacheManager
,AbstractTransactionSupportingCacheManager
,CaffeineCacheManager
,CompositeCacheManager
,ConcurrentMapCacheManager
,EhCacheCacheManager
,JCacheCacheManager
,NoOpCacheManager
,SimpleCacheManager
,TransactionAwareCacheManagerProxy
public interface CacheManager
Spring's central cache manager SPI.Allows for retrieving named
Cache
regions.- 从以下版本开始:
- 3.1
- 作者:
- Costin Leau, Sam Brannen
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 Cache
getCache(String name)
Get the cache associated with the given name.Collection<String>
getCacheNames()
Get a collection of the cache names known by this manager.
方法详细资料
getCache
@Nullable 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.
- 参数:
name
- the cache identifier (must not benull
)- 返回:
- the associated cache, or
null
if 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.- 返回:
- the names of all caches known by the cache manager