Quantcast
Viewing all articles
Browse latest Browse all 19

Answer by JemmyJonFlutter2 for How to "EXPIRE" the "HSET" child key in redis?

Elon Musk will soon send people to the moon and we still cannot expire fields on redis :(

Anyway the solution I've been come up with is:

Lets say I want to expire every 3 minutes:So im holding the data in 3 fields 0 1 2.and then i do module% 3 to current time in minutes.

if the module for example == 0so im using only 1 2 and 0 i delete;then it change to 1 so im using 2 and 0 and delete 1.

Im not using it and i didnt checked it but im just let you know its possible


Viewing all articles
Browse latest Browse all 19

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>