Package io.micronaut.cache.noop
Class NoOpCacheManager
java.lang.Object
io.micronaut.cache.noop.NoOpCacheManager
- All Implemented Interfaces:
CacheManager<Object>
@Replaces(DefaultCacheManager.class)
@Requires(property="noop-cache.enabled",
value="true")
@Primary
public class NoOpCacheManager
extends Object
implements CacheManager<Object>
A no operation
CacheManager
implementation suitable for disabling caching.
Will simply accept any items into the cache without actually storing them.
- Since:
- 1.0.0
- Author:
- Marcel Overdijk
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
NoOpCacheManager
public NoOpCacheManager()Constructor.
-
-
Method Details
-
getCacheNames
- Specified by:
getCacheNames
in interfaceCacheManager<Object>
- Returns:
- The names of the active caches
-
getCache
Description copied from interface:CacheManager
Retrieve a cache for the given name.- Specified by:
getCache
in interfaceCacheManager<Object>
- Parameters:
name
- The name of the cache- Returns:
- The
SyncCache
instance
-