diff --git a/redisson/src/main/java/org/redisson/jcache/JCache.java b/redisson/src/main/java/org/redisson/jcache/JCache.java index c5f9acfe0..4962df84f 100644 --- a/redisson/src/main/java/org/redisson/jcache/JCache.java +++ b/redisson/src/main/java/org/redisson/jcache/JCache.java @@ -82,7 +82,7 @@ public class JCache extends RedissonObject implements Cache, CacheAs * No locking required in atomic execution mode. */ - public JCache(JCacheManager cacheManager, Redisson redisson, String name, JCacheConfiguration config, boolean hasOwnRedisson) { + JCache(JCacheManager cacheManager, Redisson redisson, String name, JCacheConfiguration config, boolean hasOwnRedisson) { super(redisson.getConfig().getCodec(), redisson.getCommandExecutor(), name); this.hasOwnRedisson = hasOwnRedisson; @@ -350,7 +350,7 @@ public class JCache extends RedissonObject implements Cache, CacheAs + "end; " + "return value; ", - Arrays.asList(name, getTimeoutSetName(name), getRemovedChannelName(name)), + Arrays.asList(name, getTimeoutSetName(name)), accessTimeout, System.currentTimeMillis(), encodeMapKey(key)); } @@ -437,7 +437,7 @@ public class JCache extends RedissonObject implements Cache, CacheAs return value; } - private R write(String key, RedisCommand command, Object... params) { + R write(String key, RedisCommand command, Object... params) { RFuture future = commandExecutor.writeAsync(key, command, params); try { return get(future); @@ -3336,7 +3336,8 @@ public class JCache extends RedissonObject implements Cache, CacheAs if (accessTimeout == 0) { remove(); } else if (accessTimeout != -1) { - write(getRawName(), RedisCommands.ZADD_BOOL, getTimeoutSetName(), accessTimeout, encodeMapKey(entry.getKey())); + String name = getRawName(entry.getKey()); + write(name, RedisCommands.ZADD_BOOL, getTimeoutSetName(name), accessTimeout, encodeMapKey(entry.getKey())); } return je; } diff --git a/redisson/src/main/java/org/redisson/jcache/JCacheManager.java b/redisson/src/main/java/org/redisson/jcache/JCacheManager.java index 1aa0b530f..b37c8a6f7 100644 --- a/redisson/src/main/java/org/redisson/jcache/JCacheManager.java +++ b/redisson/src/main/java/org/redisson/jcache/JCacheManager.java @@ -60,7 +60,7 @@ public class JCacheManager implements CacheManager { private final Redisson redisson; - public JCacheManager(Redisson redisson, ClassLoader classLoader, CachingProvider cacheProvider, Properties properties, URI uri) { + JCacheManager(Redisson redisson, ClassLoader classLoader, CachingProvider cacheProvider, Properties properties, URI uri) { super(); this.classLoader = classLoader; this.cacheProvider = cacheProvider;