diff options
-rw-r--r-- | actionpack/CHANGELOG | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/caching/sweeping.rb | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 131a9db0ae..70e309489c 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fixed that sweepers defined by cache_sweeper will be added regardless of the perform_caching setting. Instead, control whether the sweeper should be run with the perform_caching setting. This makes testing easier when you want to turn perform_caching on/off [DHH] + * Make MimeResponds::Responder#any work without explicit types. Closes #11140 [jaw6] * Better error message for type conflicts when parsing params. Closes #7962 [spicycode, matt] diff --git a/actionpack/lib/action_controller/caching/sweeping.rb b/actionpack/lib/action_controller/caching/sweeping.rb index 40276a118e..3164e14f6f 100644 --- a/actionpack/lib/action_controller/caching/sweeping.rb +++ b/actionpack/lib/action_controller/caching/sweeping.rb @@ -36,7 +36,6 @@ module ActionController #:nodoc: module ClassMethods #:nodoc: def cache_sweeper(*sweepers) - return unless perform_caching configuration = sweepers.extract_options! sweepers.each do |sweeper| @@ -59,11 +58,11 @@ module ActionController #:nodoc: def before(controller) self.controller = controller - callback(:before) + callback(:before) if controller.perform_caching end def after(controller) - callback(:after) + callback(:after) if controller.perform_caching # Clean up, so that the controller can be collected after this request self.controller = nil end |