spring-framework / org.springframework.cache.support / NoOpCacheManager

NoOpCacheManager

open class NoOpCacheManager : 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.

Author
Costin Leau

Author
Stephane Nicoll

Since
3.1

See Also
CompositeCacheManager

Constructors

<init>

NoOpCacheManager()

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.

Functions

getCache

open fun getCache(name: String): Cache

This implementation always returns a Cache implementation that will not store items. Additionally, the request cache will be remembered by the manager for consistency.

getCacheNames

open fun getCacheNames(): MutableCollection<String>

This implementation returns the name of the caches previously requested.