Package io.micronaut.cache
Class DefaultCacheManager<C>
java.lang.Object
io.micronaut.cache.DefaultCacheManager<C>
- Type Parameters:
C- The native cache implementation
- All Implemented Interfaces:
CacheManager<C>
Default implementation of the
CacheManager interface.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultCacheManager(SyncCache<C>... caches) Create default cache manager for the given caches.DefaultCacheManager(List<SyncCache<C>> caches, @Nullable io.micronaut.context.BeanProvider<DynamicCacheManager<C>> dynamicCacheManager) Create default cache manager for the given caches. -
Method Summary
-
Constructor Details
-
DefaultCacheManager
@Inject public DefaultCacheManager(List<SyncCache<C>> caches, @Nullable @Nullable io.micronaut.context.BeanProvider<DynamicCacheManager<C>> dynamicCacheManager) Create default cache manager for the given caches.- Parameters:
caches- List of synchronous cache implementationsdynamicCacheManager- The dynamic cache manager
-
DefaultCacheManager
Create default cache manager for the given caches.- Parameters:
caches- List of synchronous cache implementations
-
-
Method Details
-
getCacheNames
- Specified by:
getCacheNamesin interfaceCacheManager<C>- Returns:
- The names of the active caches
-
getCache
Description copied from interface:CacheManagerRetrieve a cache for the given name.- Specified by:
getCachein interfaceCacheManager<C>- Parameters:
name- The name of the cache- Returns:
- The
SyncCacheinstance
-