K - Key type.V - Value type.public interface RedisCache<K,V>
| Modifier and Type | Method and Description |
|---|---|
void |
addInvalidationListener(Consumer<? super K> listener)
Register a invalidation
listener that is notified if a key in this Redis cache expires or gets modified. |
void |
close()
Closes this Redis cache and releases any connections associated with it.
|
V |
get(K key)
Retrieve a
value from Redis for the given cache key. |
void |
put(K key,
V value)
Associate the specified value with the specified key in this Redis cache.
|
V get(K key)
value from Redis for the given cache key.key - the key whose associated value is to be returned.null itself), or also
null if the Redis cache contains no mapping for this key.void put(K key, V value)
key - the key with which the specified value is to be associated.value - the value to be associated with the specified key.void addInvalidationListener(Consumer<? super K> listener)
listener that is notified if a key in this Redis cache expires or gets modified.listener - the listener to notify.void close()
Copyright © 2021 lettuce.io. All rights reserved.