Method: ActiveFedora::LdpCache#call

Defined in:
lib/active_fedora/ldp_cache.rb

#call(env) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/active_fedora/ldp_cache.rb', line 23

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