module Redis::Commands::Strings

def getex(key, ex: nil, px: nil, exat: nil, pxat: nil, persist: false)

Returns:
  • (String) - The value of key, or nil when key does not exist.

Parameters:
  • options (Hash) --
  • key (String) --
def getex(key, ex: nil, px: nil, exat: nil, pxat: nil, persist: false)
  args = [:getex, key]
  args << "EX" << Integer(ex) if ex
  args << "PX" << Integer(px) if px
  args << "EXAT" << Integer(exat) if exat
  args << "PXAT" << Integer(pxat) if pxat
  args << "PERSIST" if persist
  send_command(args)
end