0

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.

Jain Rach
  • 4,069
  • 1
  • 16
  • 25
Jinu Santh Rose
  • 323
  • 3
  • 15

1 Answers1

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.

Do you know Quartz?

Matías Fidemraizer
  • 63,804
  • 18
  • 124
  • 206