Method: Redis#psetex

Defined in:
lib/redis.rb

#psetex(key, ttl, value) ⇒ String

Set the time to live in milliseconds of a key.

Parameters:

  • key (String)
  • ttl (Fixnum)
  • value (String)

Returns:

  • (String)

    "OK"



779
780
781
782
783
# File 'lib/redis.rb', line 779

def psetex(key, ttl, value)
  synchronize do |client|
    client.call([:psetex, key, ttl, value.to_s])
  end
end