Does any of the java redis clients support the above primitives in their api for TTL? I am using redisson currently. This is supported by the in-memory cache lib like caffeine.
Asked
Active
Viewed 68 times
0
-
Do you mean you want to update the expire after each of these commands? – Guy Korland Dec 18 '22 at 09:43
-
basically ability to set TTL based on more than one of these. e.g. ExpireAfterRead and ExpireAfterWrite whichever expires will hit TTL for the entry – Manoj Ramakrishnan Jan 02 '23 at 21:27
-
you can register for keyspace notifications see: https://redis.io/docs/manual/keyspace-notifications/ – Guy Korland Jan 03 '23 at 07:38
1 Answers
0
You can define ttl
parameter with RMapCache object duing put
method invocation which will be analog of expireAfterWrite
method and definition of idleTimeout
parameter will be analog of expireAfterAccess
method.

Nikita Koksharov
- 10,283
- 1
- 62
- 71