Class NoOpCacheManager

  • All Implemented Interfaces:
    CacheManager

    public class NoOpCacheManager
    extends Object
    implements CacheManager
    A basic, no operation CacheManager implementation suitable for disabling caching, typically used for backing cache declarations without an actual backing store.

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

    Since:
    3.1
    Author:
    Costin Leau, Stephane Nicoll
    See Also:
    NoOpCache
    • Method Detail

      • getCache

        @Nullable
        public Cache getCache​(String name)
        This implementation always returns a Cache implementation that will not store items. Additionally, the request cache will be remembered by the manager for consistency.
        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