Reputation: 93
Is it possible to check the value of:
config.action_controller.perform_caching
...from within ApplicationController?
I have some custom caching methods that should or shouldn't be called based on this value.
Upvotes: 2
Views: 993
Reputation: 412
As of Rails 3.x, you can use this:
Rails.configuration.action_controller.perform_caching
Upvotes: 0
Reputation: 176472
ActionController::Base.perform_caching
returns true or false depending on whether the caching is enabled.
Upvotes: 1