I am using Redis for cache some key value pairs.And I put TTL for that keys So it should be deleted after that timeout.But instead of deletion I want to reset the value when the key expires.Is that possible? If so can anyone send me how to do this? Or if not possible is there any other solution for this usecase.
Asked
Active
Viewed 922 times
1 Answers
0
This isn't possible using regular Redis TTL.
Alternatively, you'll need to implement that using some application-layer scheduled job to both implement a custom TTL and the custom action to reset the value.

Matías Fidemraizer
- 63,804
- 18
- 124
- 206
-
I do not know about Quartz.Net.I am using java only.Is that possible in java? – Jinu Santh Rose Oct 16 '15 at 07:34
-
@JinuSanthRose How can you use only Java and use StackExchange.Redis? – Matías Fidemraizer Oct 16 '15 at 07:34
-
I am using Jedis as java client – Jinu Santh Rose Oct 16 '15 at 08:43
-
@JinuSanthRose So please explain why you added the tag [tag:stackexchange.redis]......... – Matías Fidemraizer Oct 16 '15 at 08:47
-
@JinuSanthRose I've edited your question tag. StackExchange.Redis is a .NET client made by StackExchange..................... In the other hand, I've changed the question "Do you know Quartz.NET" with "Do you know Quartz" (the Java counterpart to implement scheduled tasks). Take a look at the project and this plus my answer itself, it should be enough to achieve your goal. – Matías Fidemraizer Oct 16 '15 at 08:50