Class Rack::Cache::MetaStore::Dalli
In: lib/rack/cache/metastore.rb
Parent: MemCacheBase

Methods

new   purge   read   write  

Public Class methods

[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

[Source]

     # File lib/rack/cache/metastore.rb, line 332
332:       def purge(key)
333:         cache.delete(hexdigest(key))
334:         nil
335:       end

[Source]

     # File lib/rack/cache/metastore.rb, line 322
322:       def read(key)
323:         key = hexdigest(key)
324:         cache.get(key) || []
325:       end

[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

[Validate]