class ActionDispatch::RailsEntityStore

def self.resolve(uri)

def self.resolve(uri)
  new
end

def exist?(key)

def exist?(key)
  @store.exist?(key)
end

def initialize(store = Rails.cache)

def initialize(store = Rails.cache)
  @store = store
end

def open(key)

def open(key)
  @store.read(key)
end

def read(key)

def read(key)
  body = open(key)
  body.join if body
end

def write(body)

def write(body)
  buf = []
  key, size = slurp(body) { |part| buf << part }
  @store.write(key, buf)
  [key, size]
end