class Redis

def setex(key, ttl, value)

Set the value and expiration of a key.
def setex(key, ttl, value)
  synchronize do
    @client.call(:setex, key, ttl, value)
  end
end