类 NoOpCacheManager
- java.lang.Object
- org.springframework.cache.support.NoOpCacheManager
- 所有已实现的接口:
CacheManager
public class NoOpCacheManager extends Object implements CacheManager
A basic, no operationCacheManager
implementation suitable for disabling caching, typically used for backing cache declarations without an actual backing store.Will simply accept any items into the cache not actually storing them.
- 从以下版本开始:
- 3.1
- 作者:
- Costin Leau, Stephane Nicoll
- 另请参阅:
NoOpCache
构造器概要
构造器 构造器 说明 NoOpCacheManager()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Cache
getCache(String name)
This implementation always returns aCache
implementation that will not store items.Collection<String>
getCacheNames()
This implementation returns the name of the caches previously requested.
构造器详细资料
NoOpCacheManager
public NoOpCacheManager()
方法详细资料
getCache
@Nullable public Cache getCache(String name)
This implementation always returns aCache
implementation that will not store items. Additionally, the request cache will be remembered by the manager for consistency.- 指定者:
getCache
在接口中CacheManager
- 参数:
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
public Collection<String> getCacheNames()
This implementation returns the name of the caches previously requested.- 指定者:
getCacheNames
在接口中CacheManager
- 返回:
- the names of all caches known by the cache manager