class ActiveFedora::LdpCache

Active Fedora Ldp Cache

def call(env)

def call(env)
  ActiveFedora.fedora.connection.enable_cache!
  response = @app.call(env)
  response[2] = Rack::BodyProxy.new(response[2]) do
    reset_cache_settings
  end
  response
ensure
  reset_cache_settings
end

def initialize(app)

def initialize(app)
  @app = app
end

def reset_cache_settings

def reset_cache_settings
  ActiveFedora.fedora.connection.clear_cache
  ActiveFedora.fedora.connection.disable_cache!
end