How to set the value of TTL for a key to infinite?
There are 3 possible methods.
- Set useTTL to
false. - Set useTTL to
trueand set the TTL to a very large num
- Using the Expire Key method with a value less than or equal to 0.
First create a key following the second method then, use the Expire block with the key name and set the value of seconds to any -ve value or 0.
Extensions, Tutorials and Resources from Sarthak Gupta
.