Package io.micronaut.cache.caffeine
Class DefaultDynamicCacheManager
java.lang.Object
io.micronaut.cache.caffeine.DefaultDynamicCacheManager
- All Implemented Interfaces:
DynamicCacheManager<com.github.benmanes.caffeine.cache.Cache>
@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>
Default
DynamicCacheManager implementation that creates DefaultSyncCaches with default values.- Since:
- 1.3.0
- Author:
- Álvaro Sánchez-Mariscal
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultDynamicCacheManager(io.micronaut.context.ApplicationContext applicationContext, io.micronaut.core.convert.ConversionService conversionService, io.micronaut.runtime.ApplicationConfiguration applicationConfiguration) Creates a default dynamic cache manager. -
Method Summary
-
Constructor Details
-
DefaultDynamicCacheManager
public DefaultDynamicCacheManager(io.micronaut.context.ApplicationContext applicationContext, io.micronaut.core.convert.ConversionService conversionService, io.micronaut.runtime.ApplicationConfiguration applicationConfiguration) Creates a default dynamic cache manager.- Parameters:
applicationContext- the application contextconversionService- the conversion serviceapplicationConfiguration- the application configuration
-
-
Method Details
-
getCache
Description copied from interface:DynamicCacheManagerRetrieve a cache for the given name. If the cache does not previously exist, a new one will be created. The cache instance should not be cached internally because the cache manager will maintain the instance for future requests.- Specified by:
getCachein interfaceDynamicCacheManager<com.github.benmanes.caffeine.cache.Cache>- Parameters:
name- The name of the cache- Returns:
- The
SyncCacheinstance
-