Feature/csc ttl support
Hello, I add a ttl support for the jedis csc (extend the DefaultCache) to solve a issue of the jedis.You can read my commit record for the details
If somebody help me review it? Thankyou very much!
Related to https://github.com/redis/jedis/issues/4117
There is an ongoing discussion regarding adding TTL to CSC in Jedis tracked with https://github.com/redis/jedis/issues/4117 Can we take a step back and try to identify what is the issue we are trying to solve before getting to the implementation?
Of course! I can explain in detail what my PR does. In my PR, I extend the DefaultCache class under the csc package. In the extended class, I use a Map called expirationTimes to maintain an expiration time for each cache key. Additionally, I start a thread to periodically clean up keys that have already expired.
My question was about the problem we want to solve before going into concrete implementations. CSC is not intended to be a generic cache and is driven by notification from Redis server. Instead of providing an TTL implementation inside Jedis, another approach is to use integrate a third-party cache library instead of the DefaultCache implementstion provided.