I have a Rails 6 application that relies on public caching e.g. `expires_in 
1.week, public: true`. These pages must undergo integration tests 
(Capybara/Headless Chrome), and some pages change state between test cases. 
In order to prevent sporadic, order-dependent test failures, I want to 
disable HTTP caching (i.e.  "Conditional GET") in my test suite.

My first intuition, based on the docs, was that setting 
`config.action_controller.perform_caching = false` would disable all 
caching, but this turned out to not be the case. Running 
`config.middleware.delete(Rack::ConditionalGet)` also didn't make a 
difference.

So:
1. Is there a clean way to do this?
2. If there _isn't_ a way, would there be any interest in a pull request 
implementing a configuration option, e.g. 
`config.action_controller.http_caching = false `? I'd be happy to 
contribute it, but only if you feel it's a potentially worthwhile addition.

Jack

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-core/cbd8a2f2-b67c-44ab-b009-a99c77abbb3a%40googlegroups.com.

Reply via email to