public
Fork of NZKoz/koz-rails
Description: Koz's rails git-svn clone
Homepage: http://www.rubyonrails.org
Clone URL: git://github.com/eventualbuddha/koz-rails.git
Search Repo:
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]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8990 
5ecf4fe2-1ee6-0310-87b1-e25e094e27de
david (author)
Fri Mar 07 17:05:53 -0800 2008
commit  77dade41743c3dc9926adebcbd099cf8e5649ec9
tree    eaac523d31e96bb6bbc5b82eec183b19da29c155
parent  c6ecd5852d9f52d99336288571ba01e5bc6ca722
...
1
2
 
 
3
4
5
...
1
2
3
4
5
6
7
0
@@ -1,5 +1,7 @@
0
 *SVN*
0
 
0
+* 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]
0
+
0
 * Make MimeResponds::Responder#any work without explicit types. Closes #11140 [jaw6]
0
 
0
 * Better error message for type conflicts when parsing params. Closes #7962 [spicycode, matt]
...
36
37
38
39
40
41
42
...
59
60
61
62
 
63
64
65
66
 
67
68
69
...
36
37
38
 
39
40
41
...
58
59
60
 
61
62
63
64
 
65
66
67
68
0
@@ -36,7 +36,6 @@ module ActionController #:nodoc:
0
 
0
       module ClassMethods #:nodoc:
0
         def cache_sweeper(*sweepers)
0
- return unless perform_caching
0
           configuration = sweepers.extract_options!
0
 
0
           sweepers.each do |sweeper|
0
@@ -59,11 +58,11 @@ module ActionController #:nodoc:
0
 
0
         def before(controller)
0
           self.controller = controller
0
- callback(:before)
0
+ callback(:before) if controller.perform_caching
0
         end
0
 
0
         def after(controller)
0
- callback(:after)
0
+ callback(:after) if controller.perform_caching
0
           # Clean up, so that the controller can be collected after this request
0
           self.controller = nil
0
         end

Comments

    No one has commented yet.