middleware.rb 254 B

123456789101112131415
  1. module RailsSettings
  2. class Middleware
  3. def initialize(app)
  4. @app = app
  5. end
  6. def call(env)
  7. RailsSettings::RequestCache.enable!
  8. result = @app.call(env)
  9. RailsSettings::RequestCache.disable!
  10. result
  11. end
  12. end
  13. end