class BooticClient::Stores::Memcache
Attributes
client[R]
Public Class Methods
new(server_hosts, dalli_options = {})
click to toggle source
# File lib/bootic_client/stores/memcache.rb, line 8 def initialize(server_hosts, dalli_options = {}) @client = Dalli::Client.new(Array(server_hosts), dalli_options) end
Public Instance Methods
delete(key)
click to toggle source
# File lib/bootic_client/stores/memcache.rb, line 24 def delete(key) @client.delete key end
get(key)
click to toggle source
# File lib/bootic_client/stores/memcache.rb, line 20 def get(key) @client.get key end
read(key)
click to toggle source
# File lib/bootic_client/stores/memcache.rb, line 12 def read(key) @client.get key.to_s end
set(key, data, ttl = nil)
click to toggle source
# File lib/bootic_client/stores/memcache.rb, line 28 def set(key, data, ttl = nil) @client.set key, data, ttl end
stats()
click to toggle source
# File lib/bootic_client/stores/memcache.rb, line 32 def stats @client.stats end
write(key, data, ttl = nil)
click to toggle source
# File lib/bootic_client/stores/memcache.rb, line 16 def write(key, data, ttl = nil) @client.set key.to_s, data, ttl end