Rack::Cache::MetaStore::Dalli

Public Class Methods

new(server="localhost:11211", options={}) click to toggle source
     # File lib/rack/cache/metastore.rb, line 312
312:       def initialize(server="localhost:11211", options={})
313:         @cache =
314:           if server.respond_to?(:stats)
315:             server
316:           else
317:             require 'dalli'
318:             ::Dalli::Client.new(server, options)
319:           end
320:       end

Public Instance Methods

purge(key) click to toggle source
     # File lib/rack/cache/metastore.rb, line 332
332:       def purge(key)
333:         cache.delete(hexdigest(key))
334:         nil
335:       end
read(key) click to toggle source
     # File lib/rack/cache/metastore.rb, line 322
322:       def read(key)
323:         key = hexdigest(key)
324:         cache.get(key) || []
325:       end
write(key, entries) click to toggle source
     # File lib/rack/cache/metastore.rb, line 327
327:       def write(key, entries)
328:         key = hexdigest(key)
329:         cache.set(key, entries)
330:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.