Skip to content

Commit

Permalink
Rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
sazzad16 committed Mar 4, 2024
1 parent 7784a9b commit c620950
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/redis/clients/jedis/ClientSideCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ public abstract class ClientSideCache {
protected static final int DEFAULT_MAXIMUM_SIZE = 10_000;
protected static final int DEFAULT_EXPIRE_SECONDS = 100;

private final CommandLongHashing function;
private final CommandLongHashing commandHashing;
private final Map<ByteBuffer, Set<Long>> keyToCommandHashes;

protected ClientSideCache(CommandLongHashing function) {
this.function = function;
protected ClientSideCache(CommandLongHashing commandHashing) {
this.commandHashing = commandHashing;
this.keyToCommandHashes = new ConcurrentHashMap<>();
}

Expand Down Expand Up @@ -71,7 +71,7 @@ private void invalidateKeyAndRespectiveCommandHashes(Object key) {

final <T> T getValue(Function<CommandObject<T>, T> loader, CommandObject<T> command, Object... keys) {

final long hash = function.hash(command);
final long hash = commandHashing.hash(command);

T value = (T) get(hash);
if (value != null) {
Expand Down

0 comments on commit c620950

Please sign in to comment.