2808 explained code solutions for 75 technologies

lua-redisGet key TTL

local redis = (require 'redis').connect('', 6379)
local expires_in = redis:ttl('key')ctrl + c
require 'redis'

load Redis module for Lua


connect to Redis server

'', 6379

Redis host and port to connect to


returns seconds it'll take specified key to expire (or -1 if it's not expirable)


name of the key to get expiration second for