class Rack::Cache::EntityStore::Noop

Noop Entity Store backend.

Set ‘entitystore` to ’noop:/‘. Does not persist response bodies (no disk/memory used). Responses from the cache will have an empty body. Clients must ignore these empty cached response (check for x-rack-cache response header). Atm cannot handle streamed responses, patch needed.

Public Class Methods

resolve(uri) click to toggle source
    # File lib/rack/cache/entity_store.rb
363 def self.resolve(uri)
364   new
365 end

Public Instance Methods

exist?(key) click to toggle source
    # File lib/rack/cache/entity_store.rb
342 def exist?(key)
343   true
344 end
open(key) click to toggle source
    # File lib/rack/cache/entity_store.rb
350 def open(key)
351   []
352 end
purge(key) click to toggle source
    # File lib/rack/cache/entity_store.rb
359 def purge(key)
360   nil
361 end
read(key) click to toggle source
    # File lib/rack/cache/entity_store.rb
346 def read(key)
347   ''
348 end
write(body, ttl=nil) click to toggle source
    # File lib/rack/cache/entity_store.rb
354 def write(body, ttl=nil)
355   key, size = slurp(body) { |part| part }
356   [key, size]
357 end