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

NoOpCache

open class NoOpCache : Cache

A no operation Cache implementation suitable for disabling caching.

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

Author
Costin Leau

Author
Stephane Nicoll

Since
4.3.4

Constructors

<init>

NoOpCache(name: String)

Create a NoOpCache instance with the specified name

Functions

clear

open fun clear(): Unit

evict

open fun evict(key: Any): Unit

get

open fun get(key: Any): ValueWrapper
open fun <T : Any> get(key: Any, type: Class<T>): T
open fun <T : Any> get(key: Any, valueLoader: Callable<T>): T

getName

open fun getName(): String

getNativeCache

open fun getNativeCache(): Any

put

open fun put(key: Any, value: Any): Unit

putIfAbsent

open fun putIfAbsent(key: Any, value: Any): ValueWrapper