issue #2220 - client side caching PoC test 1 #2236
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I have created a small Proof of Concept for Client Side Caching.
The ideas behind it:
jedis.clientTracking
is called & enabled the cache is done for GET and HGETALLQ1: Should I continue with this approach, where I make the cache almost transparent for the user, but it will impact all the client code to check if the connection is using CSC ?
OR should I used a different approach where the client instantiate a new class associated to the client, and have to call
JedisClientCache.get/hgetall
. (this allows a better isolation of the code for caching)Q2: if I stay with the current approach I do not know how to create a new connection on the fly with the same connection string information (needed for Pub/Sub client in RESP2) this is why I pass a Jedis connection to the
ClientTracking
method down to the Client code itself.As I said it is just a PoC open for comments/discussions. (few hours of work during my PTO while kids are sleeping.. so probably need a lot more thinking....)