C
- The native cache implementation@Singleton @Primary public class DefaultCacheManager<C> extends Object implements CacheManager<C>
CacheManager
interface.Constructor and Description |
---|
DefaultCacheManager(List<SyncCache<C>> caches,
io.micronaut.context.BeanProvider<DynamicCacheManager<C>> dynamicCacheManager)
Create default cache manager for the given caches.
|
DefaultCacheManager(SyncCache<C>... caches)
Create default cache manager for the given caches.
|
Modifier and Type | Method and Description |
---|---|
SyncCache<C> |
getCache(String name)
Retrieve a cache for the given name.
|
Set<String> |
getCacheNames() |
@Inject public DefaultCacheManager(List<SyncCache<C>> caches, @Nullable io.micronaut.context.BeanProvider<DynamicCacheManager<C>> dynamicCacheManager)
caches
- List of synchronous cache implementationsdynamicCacheManager
- The dynamic cache manager@NonNull public Set<String> getCacheNames()
getCacheNames
in interface CacheManager<C>
@NonNull public SyncCache<C> getCache(String name)
CacheManager
getCache
in interface CacheManager<C>
name
- The name of the cacheSyncCache
instance