Class NoOpCacheManager

  • All Implemented Interfaces:
    io.micronaut.cache.CacheManager<java.lang.Object>

    @Replaces(io.micronaut.cache.DefaultCacheManager.class)
    @Requires(property="noop-cache.enabled",
              value="true")
    @Primary
    public class NoOpCacheManager
    extends java.lang.Object
    implements io.micronaut.cache.CacheManager<java.lang.Object>
    A no operation CacheManager implementation suitable for disabling caching.

    Will simply accept any items into the cache without actually storing them.

    Since:
    1.0.0
    • Constructor Summary

      Constructors 
      Constructor Description
      NoOpCacheManager()
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      io.micronaut.cache.SyncCache<java.lang.Object> getCache​(java.lang.String name)  
      java.util.Set<java.lang.String> getCacheNames()  
      • Methods inherited from class java.lang.Object

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

      • NoOpCacheManager

        public NoOpCacheManager()
        Constructor.
    • Method Detail

      • getCacheNames

        @NonNull
        public java.util.Set<java.lang.String> getCacheNames()
        Specified by:
        getCacheNames in interface io.micronaut.cache.CacheManager<java.lang.Object>
      • getCache

        @NonNull
        public io.micronaut.cache.SyncCache<java.lang.Object> getCache​(java.lang.String name)
        Specified by:
        getCache in interface io.micronaut.cache.CacheManager<java.lang.Object>