Examples:
Get single value in quiet mode (the default)
c.get("foo")
Use alternative hash-like syntax
c["foo"]
Get single value in verbose mode
c.get("missing-foo", :quiet => false) c.get("missing-foo", :quiet => true)
Get and touch single value. The key won’t be accessible after 10 seconds
c.get("foo", :ttl => 10)
val, flags, cas = c.get("foo", :extended => true)
c.get("foo", "bar", "baz")
Get multiple keys with assembing result into the Hash
c.get("foo", "bar", "baz", :assemble_hash => true)
Extended get multiple keys
c.get("foo", "bar", :extended => true)
c.run do
c.get("foo", "bar", "baz") do |res|
ret.operation ret.success? ret.key ret.value
ret.flags
ret.cas
end
end
Get and lock key using default timeout
c.get("foo", :lock => true)
Determine lock timeout parameters
c.stats.values_at("ep_getl_default_timeout", "ep_getl_max_timeout")
Get and lock key using custom timeout
c.get("foo", :lock => 3)
Get and lock multiple keys using custom timeout
c.get("foo", "bar", :lock => 3)