Class NoOpCacheManager
java.lang.Object
org.springframework.cache.support.NoOpCacheManager
- All Implemented Interfaces:
CacheManager
A basic, no operation
CacheManager implementation suitable
for disabling caching, typically used for backing cache declarations
without an actual backing store.
This implementation will simply accept any items into the cache, not actually storing them.
- Since:
- 3.1
- Author:
- Costin Leau, Stephane Nicoll, Juergen Hoeller
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the cache associated with the given name.Get a collection of the cache names known by this manager.
-
Constructor Details
-
NoOpCacheManager
public NoOpCacheManager()
-
-
Method Details
-
getCache
Description copied from interface:CacheManagerGet the cache associated with the given name.Note that the cache may be lazily created at runtime if the native provider supports it.
- Specified by:
getCachein interfaceCacheManager- 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
Description copied from interface:CacheManagerGet a collection of the cache names known by this manager.- Specified by:
getCacheNamesin interfaceCacheManager- Returns:
- the names of all caches known by the cache manager
-