Class: Gateway::Memcache

Inherits:
Base
  • Object
show all
Defined in:
lib/gateway/memcache.rb

Instance Method Summary collapse

Instance Method Details

#get(id, raw = false) ⇒ Object



9
10
11
12
13
14
# File 'lib/gateway/memcache.rb', line 9

def get(id, raw = false)
  opts = {:retry => false}
  execute(:get, id, opts) do |conn|
    conn.get(id, raw)
  end
end

#set(id, value, expiration = 0, raw = false) ⇒ Object



16
17
18
19
20
21
# File 'lib/gateway/memcache.rb', line 16

def set(id, value, expiration=0, raw = false)
  opts = {:retry => false}
  execute(:set, id, opts) do |conn|
    conn.set(id, value, expiration, raw)
  end
end