Class DefaultDynamicCacheManager

  • All Implemented Interfaces:
    io.micronaut.cache.DynamicCacheManager<com.github.benmanes.caffeine.cache.Cache>

    @Singleton
    @Requires(missingBeans=io.micronaut.cache.DynamicCacheManager.class) @Requires(property="micronaut.cache.dynamic",notEquals="false")
    public class DefaultDynamicCacheManager
    extends java.lang.Object
    implements io.micronaut.cache.DynamicCacheManager<com.github.benmanes.caffeine.cache.Cache>
    Default DynamicCacheManager implementation that creates DefaultSyncCaches with default values.
    Since:
    1.3.0
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultDynamicCacheManager​(io.micronaut.context.ApplicationContext applicationContext, io.micronaut.core.convert.ConversionService<?> conversionService, io.micronaut.runtime.ApplicationConfiguration applicationConfiguration)
      Creates a default dynamic cache manager.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      io.micronaut.cache.SyncCache<com.github.benmanes.caffeine.cache.Cache> getCache​(java.lang.String name)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • 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 context
        conversionService - the conversion service
        applicationConfiguration - the application configuration
    • Method Detail

      • getCache

        @NonNull
        public io.micronaut.cache.SyncCache<com.github.benmanes.caffeine.cache.Cache> getCache​(java.lang.String name)
        Specified by:
        getCache in interface io.micronaut.cache.DynamicCacheManager<com.github.benmanes.caffeine.cache.Cache>