Quantcast
Channel: Recent Gists from itamarhaber
Viewing all articles
Browse latest Browse all 36

Redis absolute TTL (accuracy +/- 1 second)

$
0
0
absttl.lua
-- Returns a key's absolute TTL
local t = tonumber(redis.call('TTL', KEYS[1]))
if t > 0 then
t = t + tonumber(redis.call('TIME')[1])
end
return t

Viewing all articles
Browse latest Browse all 36

Trending Articles



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