Method: Redis#ttl
- Defined in:
- lib/redis.rb
#ttl(key) ⇒ Fixnum
Get the time to live (in seconds) for a key.
329 330 331 332 333 |
# File 'lib/redis.rb', line 329 def ttl(key) synchronize do |client| client.call([:ttl, key]) end end |