Class | Rack::Cache::EntityStore::MemCache |
In: |
lib/rack/cache/entitystore.rb
|
Parent: | MemCacheBase |
Uses the memcache-client ruby library. This is the default unless the memcached library has already been required.
# File lib/rack/cache/entitystore.rb, line 210 210: def initialize(server="localhost:11211", options={}) 211: @cache = 212: if server.respond_to?(:stats) 213: server 214: else 215: require 'memcache' 216: ::MemCache.new(server, options) 217: end 218: end
# File lib/rack/cache/entitystore.rb, line 220 220: def exist?(key) 221: !cache.get(key).nil? 222: end
# File lib/rack/cache/entitystore.rb, line 234 234: def purge(key) 235: cache.delete(key) 236: nil 237: end