Sha256: 186824d76c08c28240255e38354aab749cc6b53949e64a975c4af2dd4e316a7b
Contents?: true
Size: 585 Bytes
Versions: 15
Compression:
Stored size: 585 Bytes
Contents
module ActiveSupport module Cache class MemcacheStore def initialize(cache) @cache = cache end def read(key, options = {}) @cache.get(key, options) rescue Memcached::NotFound nil end def increment(key) @cache.incr(key) end def write(key, value, options = {}) if expires_in = options.delete(:expires_in) options[:expiry] = expires_in.to_i end @cache.set(key, value, options) end def delete(key) @cache.delete(key) end end end end
Version data entries
15 entries across 15 versions & 1 rubygems