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
369 def self.resolve(uri)
370   new
371 end

Public Instance Methods

exist?(key) click to toggle source
    # File lib/rack/cache/entity_store.rb
348 def exist?(key)
349   true
350 end
open(key) click to toggle source
    # File lib/rack/cache/entity_store.rb
356 def open(key)
357   []
358 end
purge(key) click to toggle source
    # File lib/rack/cache/entity_store.rb
365 def purge(key)
366   nil
367 end
read(key) click to toggle source
    # File lib/rack/cache/entity_store.rb
352 def read(key)
353   ''
354 end
write(body, ttl=nil) click to toggle source
    # File lib/rack/cache/entity_store.rb
360 def write(body, ttl=nil)
361   key, size = slurp(body) { |part| part }
362   [key, size]
363 end