@Singleton @Requires(missingBeans=DynamicCacheManager.class) @Requires(property="micronaut.cache.dynamic",notEquals="false") public class DefaultDynamicCacheManager extends Object implements DynamicCacheManager<com.github.benmanes.caffeine.cache.Cache>
DynamicCacheManager implementation that creates DefaultSyncCaches with default values.| Constructor and Description |
|---|
DefaultDynamicCacheManager(io.micronaut.context.ApplicationContext applicationContext,
io.micronaut.core.convert.ConversionService<?> conversionService,
io.micronaut.runtime.ApplicationConfiguration applicationConfiguration)
Creates a default dynamic cache manager.
|
| Modifier and Type | Method and Description |
|---|---|
SyncCache<com.github.benmanes.caffeine.cache.Cache> |
getCache(String name)
Retrieve a cache for the given name.
|
public DefaultDynamicCacheManager(io.micronaut.context.ApplicationContext applicationContext,
io.micronaut.core.convert.ConversionService<?> conversionService,
io.micronaut.runtime.ApplicationConfiguration applicationConfiguration)
applicationContext - the application contextconversionService - the conversion serviceapplicationConfiguration - the application configuration@NonNull public SyncCache<com.github.benmanes.caffeine.cache.Cache> getCache(String name)
DynamicCacheManagergetCache in interface DynamicCacheManager<com.github.benmanes.caffeine.cache.Cache>name - The name of the cacheSyncCache instance