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 308
308:       def initialize(server="localhost:11211", options={})
309:         @cache =
310:           if server.respond_to?(:stats)
311:             server
312:           else
313:             require 'dalli'
314:             ::Dalli::Client.new(server, options)
315:           end
316:       end

Public Instance methods

[Source]

     # File lib/rack/cache/metastore.rb, line 328
328:       def purge(key)
329:         cache.delete(hexdigest(key))
330:         nil
331:       end

[Source]

     # File lib/rack/cache/metastore.rb, line 318
318:       def read(key)
319:         key = hexdigest(key)
320:         cache.get(key) || []
321:       end

[Source]

     # File lib/rack/cache/metastore.rb, line 323
323:       def write(key, entries)
324:         key = hexdigest(key)
325:         cache.set(key, entries)
326:       end

[Validate]