Method: Rubcask::Server::Client#setex

Defined in:
lib/rubcask/server/client.rb

#setex(key, value, ttl) ⇒ String, Protocol::NIL

Ping the server Use this method to check if server is running and responding

Parameters:

  • key (String)
  • value (String)
  • ttl (Integer, String)

Returns:

  • (String)

    Binary string representing the value

  • (Protocol::NIL)

    If no data associated with the key

Raises:



82
83
84
# File 'lib/rubcask/server/client.rb', line 82

def setex(key, value, ttl)
  call_method("setex", key, value, ttl.to_s)
end