Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Client-side caching] About the Implementation of CSC #4013

Open
wp973 opened this issue Nov 8, 2024 · 3 comments
Open

[Client-side caching] About the Implementation of CSC #4013

wp973 opened this issue Nov 8, 2024 · 3 comments

Comments

@wp973
Copy link

wp973 commented Nov 8, 2024

Hi, I would like to ask a question about the implementation of CSC.

Why choose the default mode to implement CSC? Redis documentation describes that the default mode costs some memory on the server side.

  private void initializeClientSideCache() {
    sendCommand(Protocol.Command.CLIENT, "TRACKING", "ON");
    String reply = getStatusCodeReply();
    if (!"OK".equals(reply)) {
      throw new JedisException("Could not enable client tracking. Reply: " + reply);
    }
  }

Thanks~

https://redis.io/docs/latest/develop/reference/client-side-caching/#the-redis-implementation-of-client-side-caching

Redis / Jedis Configuration

Jedis version: 5.2.0 GA

Redis version: > 6.0

Java version: 21

@sazzad16
Copy link
Collaborator

sazzad16 commented Nov 8, 2024

We would have to start from somewhere. Right?
It would never be shipped if we were trying to support all the configuration parameters in our first CSC support release.

We welcome PRs to support different CSC configuration parameters.

@wp973
Copy link
Author

wp973 commented Nov 11, 2024

@sazzad16 Thanks for your reply!

When we use the default mode, maybe we should limit the maximum number of tracking keys to avoid consuming too much server-side memory?

As described in redis.conf:

image

@sazzad16
Copy link
Collaborator

When we use the default mode, maybe we should limit the maximum number of tracking keys to avoid consuming too much server-side memory?

Yes, this is a good idea to follow for the users and maintain at the server side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants