class Redis

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" << ex if ex
  args << "PX" << px if px
  args << "EXAT" << exat if exat
  args << "PXAT" << pxat if pxat
  args << "PERSIST" if persist
  synchronize do |client|
    client.call(args)
  end
end