Package io.quarkus.cache.redis.runtime
Interface RedisCache
- All Superinterfaces:
Cache
- All Known Implementing Classes:
RedisCacheImpl
-
Method Summary
Modifier and TypeMethodDescription<K,V> io.smallrye.mutiny.Uni<V> Allows retrieving a value from the Redis cache.default <K,V> io.smallrye.mutiny.Uni<V> <K,V> io.smallrye.mutiny.Uni<V> Allows retrieving a value from the Redis cache.default <K,V> io.smallrye.mutiny.Uni<V> Class<?>When configured, gets the default type of the value stored in the cache.<K,V> io.smallrye.mutiny.Uni<V> getOrDefault(K key, V defaultValue) <K,V> io.smallrye.mutiny.Uni<V> <K,V> io.smallrye.mutiny.Uni<Void> default <K,V> io.smallrye.mutiny.Uni<Void> put(K key, V value) Put a value in the cache.Methods inherited from interface io.quarkus.cache.Cache
as, getDefaultKey, getName, invalidate, invalidateAll, invalidateIf
-
Method Details
-
getDefaultValueType
Class<?> getDefaultValueType()When configured, gets the default type of the value stored in the cache. The configured type is used when no type is passed into theget(Object, Class, Function).- Returns:
- the type,
nullif not configured.
-
get
-
getAsync
default <K,V> io.smallrye.mutiny.Uni<V> getAsync(K key, Function<K, io.smallrye.mutiny.Uni<V>> valueLoader) -
get
Allows retrieving a value from the Redis cache.- Type Parameters:
K- the type of keyV- the type of value- Parameters:
key- the keyclazz- the class of the valuevalueLoader- the value loader called when there is no value stored in the cache- Returns:
- the Uni emitting the cached value.
-
getAsync
<K,V> io.smallrye.mutiny.Uni<V> getAsync(K key, Class<V> clazz, Function<K, io.smallrye.mutiny.Uni<V>> valueLoader) Allows retrieving a value from the Redis cache.- Type Parameters:
K- the type of keyV- the type of value- Parameters:
key- the keyclazz- the class of the valuevalueLoader- the value loader called when there is no value stored in the cache- Returns:
- the Uni emitting the cached value.
-
put
Put a value in the cache.- Type Parameters:
K- the type of keyV- the type of value- Parameters:
key- the keyvalue- the value- Returns:
- a Uni emitting
nullwhen the operation completes
-
put
-
getOrDefault
<K,V> io.smallrye.mutiny.Uni<V> getOrDefault(K key, V defaultValue) -
getOrNull
-