Rack::Cache::MetaStore::MemCacheBase
The Memcached instance used to communicated with the memcached daemon.
# File lib/rack/cache/metastore.rb, line 339 def initialize(server="localhost:11211", options={}) @cache = if server.respond_to?(:stats) server else require 'memcached' Memcached.new(server, options) end end
# File lib/rack/cache/metastore.rb, line 361 def purge(key) key = hexdigest(key) cache.delete(key) nil rescue Memcached::NotFound nil end
# File lib/rack/cache/metastore.rb, line 349 def read(key) key = hexdigest(key) cache.get(key) rescue Memcached::NotFound [] end
# File lib/rack/cache/metastore.rb, line 356 def write(key, entries) key = hexdigest(key) cache.set(key, entries) end
[Validate]
Generated with the Darkfish Rdoc Generator 2.