Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 8990

Show
Ignore:
Timestamp:
03/08/08 01:05:53 (2 years ago)
Author:
david
Message:

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]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/CHANGELOG

    r8987 r8990  
    11*SVN* 
     2 
     3* 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] 
    24 
    35* Make MimeResponds::Responder#any work without explicit types. Closes #11140 [jaw6] 
  • trunk/actionpack/lib/action_controller/caching/sweeping.rb

    r8819 r8990  
    3737      module ClassMethods #:nodoc: 
    3838        def cache_sweeper(*sweepers) 
    39           return unless perform_caching 
    4039          configuration = sweepers.extract_options! 
    4140 
     
    6059        def before(controller) 
    6160          self.controller = controller 
    62           callback(:before) 
     61          callback(:before) if controller.perform_caching 
    6362        end 
    6463 
    6564        def after(controller) 
    66           callback(:after) 
     65          callback(:after) if controller.perform_caching 
    6766          # Clean up, so that the controller can be collected after this request 
    6867          self.controller = nil