public class RedisClusterCache extends AbstractRedisCache
Cache.NamedKey| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanup() |
protected byte[] |
getFromRedis(byte[] key) |
protected Pair<Integer,Map<Cache.NamedKey,byte[]>> |
mgetFromRedis(Iterable<Cache.NamedKey> keys)
Jedis does not work if the given keys are distributed among different redis nodes
A simple workaround is to group keys by their slots and mget values for each slot.
|
protected void |
putToRedis(byte[] key,
byte[] value,
RedisCacheConfig.DurationConfig expiration) |
protected byte[] getFromRedis(byte[] key)
getFromRedis in class AbstractRedisCacheprotected void putToRedis(byte[] key,
byte[] value,
RedisCacheConfig.DurationConfig expiration)
putToRedis in class AbstractRedisCacheprotected Pair<Integer,Map<Cache.NamedKey,byte[]>> mgetFromRedis(Iterable<Cache.NamedKey> keys)
In future, Jedis could be replaced by the Lettuce driver which supports mget operation on a redis cluster
mgetFromRedis in class AbstractRedisCacheprotected void cleanup()
cleanup in class AbstractRedisCacheCopyright © 2011–2021 The Apache Software Foundation. All rights reserved.