Class CompositeCacheManager

    • Constructor Detail

      • CompositeCacheManager

        public CompositeCacheManager​(CacheManager... cacheManagers)
        Construct a CompositeCacheManager from the given delegate CacheManagers.
        Parameters:
        cacheManagers - the CacheManagers to delegate to
    • Method Detail

      • setFallbackToNoOpCache

        public void setFallbackToNoOpCache​(boolean fallbackToNoOpCache)
        Indicate whether a NoOpCacheManager should be added at the end of the delegate list. In this case, any getCache requests not handled by the configured CacheManagers will be automatically handled by the NoOpCacheManager (and hence never return null).
      • afterPropertiesSet

        public void afterPropertiesSet()
        Description copied from interface: InitializingBean
        Invoked by the containing BeanFactory after it has set all bean properties and satisfied BeanFactoryAware, ApplicationContextAware etc.

        This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.

        Specified by:
        afterPropertiesSet in interface InitializingBean
      • getCache

        public Cache getCache​(String name)
        Description copied from interface: CacheManager
        Get the cache associated with the given name.

        Note that the cache may be lazily created at runtime if the native provider supports it.

        Specified by:
        getCache in interface CacheManager
        Parameters:
        name - the cache identifier (must not be null)
        Returns:
        the associated cache, or null if such a cache does not exist or could be not created