Package io.quarkus.cache.runtime.noop
Class NoOpCache
java.lang.Object
io.quarkus.cache.runtime.AbstractCache
io.quarkus.cache.runtime.noop.NoOpCache
- All Implemented Interfaces:
Cache
This class is an internal Quarkus cache implementation. Do not use it explicitly from your Quarkus application. The public
methods signatures may change without prior notice.
-
Field Summary
Fields inherited from class io.quarkus.cache.runtime.AbstractCache
NULL_KEYS_NOT_SUPPORTED_MSG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<K,V> io.smallrye.mutiny.Uni <V> Returns a lazy asynchronous action that will emit the cache value identified bykey, obtaining that value fromvalueLoaderif necessary.<K,V> io.smallrye.mutiny.Uni <V> Returns a lazy asynchronous action that will emit the cache value identified bykey, obtaining that value fromvalueLoaderif necessary.getName()Returns the cache name.io.smallrye.mutiny.Uni<Void> invalidate(Object key) Removes the cache entry identified bykeyfrom the cache.io.smallrye.mutiny.Uni<Void> Removes all entries from the cache.io.smallrye.mutiny.Uni<Void> invalidateIf(Predicate<Object> predicate) Removes all cache entries whose keys match the given predicate.Methods inherited from class io.quarkus.cache.runtime.AbstractCache
as, getDefaultKey
-
Constructor Details
-
NoOpCache
public NoOpCache()
-
-
Method Details
-
getName
Description copied from interface:CacheReturns the cache name.- Returns:
- cache name
-
get
Description copied from interface:CacheReturns a lazy asynchronous action that will emit the cache value identified bykey, obtaining that value fromvalueLoaderif necessary.- Type Parameters:
K- cache key typeV- cache value type- Parameters:
key- cache keyvalueLoader- function used to compute a cache value ifkeyis not already associated with a value- Returns:
- a lazy asynchronous action that will emit a cache value
-
getAsync
public <K,V> io.smallrye.mutiny.Uni<V> getAsync(K key, Function<K, io.smallrye.mutiny.Uni<V>> valueLoader) Description copied from interface:CacheReturns a lazy asynchronous action that will emit the cache value identified bykey, obtaining that value fromvalueLoaderif necessary.- Type Parameters:
K-V-- Parameters:
key-valueLoader-- Returns:
- a lazy asynchronous action that will emit a cache value
-
invalidate
Description copied from interface:CacheRemoves the cache entry identified bykeyfrom the cache. If the key does not identify any cache entry, nothing will happen.- Parameters:
key- cache key
-
invalidateAll
Description copied from interface:CacheRemoves all entries from the cache. -
invalidateIf
Description copied from interface:CacheRemoves all cache entries whose keys match the given predicate.- Parameters:
predicate-
-