From e5a7659452ae260a8b1b11f8bdd012014bde0ad8 Mon Sep 17 00:00:00 2001 From: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com> Date: Sun, 10 Mar 2024 16:47:11 +0600 Subject: [PATCH] Guava HashFunction is preferred over CommandLongHasher --- .../java/redis/clients/jedis/csc/GuavaClientSideCache.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/redis/clients/jedis/csc/GuavaClientSideCache.java b/src/main/java/redis/clients/jedis/csc/GuavaClientSideCache.java index 76446db52a..ca176e8b33 100644 --- a/src/main/java/redis/clients/jedis/csc/GuavaClientSideCache.java +++ b/src/main/java/redis/clients/jedis/csc/GuavaClientSideCache.java @@ -106,8 +106,8 @@ public GuavaClientSideCache build() { cb.expireAfterWrite(expireTime, expireTimeUnit); - return commandHasher != null ? new GuavaClientSideCache(cb.build(), commandHasher, cacheable) - : hashFunction != null ? new GuavaClientSideCache(cb.build(), new GuavaCommandHasher(hashFunction), cacheable) + return hashFunction != null ? new GuavaClientSideCache(cb.build(), new GuavaCommandHasher(hashFunction), cacheable) + : commandHasher != null ? new GuavaClientSideCache(cb.build(), commandHasher, cacheable) : new GuavaClientSideCache(cb.build(), cacheable); } }