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, line 369 def self.resolve(uri) new end
Public Instance Methods
exist?(key)
click to toggle source
# File lib/rack/cache/entity_store.rb, line 348 def exist?(key) true end
open(key)
click to toggle source
# File lib/rack/cache/entity_store.rb, line 356 def open(key) [] end
purge(key)
click to toggle source
# File lib/rack/cache/entity_store.rb, line 365 def purge(key) nil end
read(key)
click to toggle source
# File lib/rack/cache/entity_store.rb, line 352 def read(key) '' end
write(body, ttl=nil)
click to toggle source
# File lib/rack/cache/entity_store.rb, line 360 def write(body, ttl=nil) key, size = slurp(body) { |part| part } [key, size] end