@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 DefaultSyncCache
s with default values.Constructor and Description |
---|
DefaultDynamicCacheManager(ApplicationContext applicationContext,
ConversionService<?> conversionService,
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(ApplicationContext applicationContext, ConversionService<?> conversionService, ApplicationConfiguration applicationConfiguration)
applicationContext
- the application contextconversionService
- the conversion serviceapplicationConfiguration
- the application configuration@Nonnull public SyncCache<com.github.benmanes.caffeine.cache.Cache> getCache(String name)
DynamicCacheManager
getCache
in interface DynamicCacheManager<com.github.benmanes.caffeine.cache.Cache>
name
- The name of the cacheSyncCache
instance