Skip to content

Commit

Permalink
common default values in base class
Browse files Browse the repository at this point in the history
  • Loading branch information
sazzad16 committed Feb 12, 2024
1 parent fafca79 commit b82840a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/main/java/redis/clients/jedis/ClientSideCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
*/
public abstract class ClientSideCache {

protected static final int DEFAULT_MAXIMUM_SIZE = 10_000;
protected static final int DEFAULT_EXPIRE_SECONDS = 100;

private final Map<ByteBuffer, Set<Long>> keyToCommandHashes;

protected ClientSideCache() {
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/redis/clients/jedis/util/CaffeineCSC.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

public class CaffeineCSC extends ClientSideCache {

private static final int DEFAULT_MAXIMUM_SIZE = 10_000;
private static final int DEFAULT_EXPIRE_SECONDS = 100;
private static final LongHashFunction DEFAULT_HASH_FUNCTION = LongHashFunction.xx3();

private final Cache<Long, Object> cache;
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/redis/clients/jedis/util/GuavaCSC.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

public class GuavaCSC extends ClientSideCache {

private static final int DEFAULT_MAXIMUM_SIZE = 10_000;
private static final int DEFAULT_EXPIRE_SECONDS = 100;
private static final HashFunction DEFAULT_HASH_FUNCTION = com.google.common.hash.Hashing.fingerprint2011();

private final Cache<Long, Object> cache;
Expand Down

0 comments on commit b82840a

Please sign in to comment.