aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/CHANGELOG2
-rw-r--r--actionpack/lib/action_controller/caching.rb2
2 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index 8a6892a3ed..7c00e8d8dd 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Set sweeper's @controller to nil after a request so that the controller may be collected between requests.
+
* Subclasses of ActionController::Caching::Sweeper should be Reloadable. [Rick Olson]
* Document the :xhr option for verifications. #3666 [leeo]
diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb
index 5e6fe3948b..4c1c6e6679 100644
--- a/actionpack/lib/action_controller/caching.rb
+++ b/actionpack/lib/action_controller/caching.rb
@@ -532,6 +532,8 @@ module ActionController #:nodoc:
def after(controller)
callback(:after)
+ # Clean up, so that the controller can be collected after this request
+ self.controller = nil
end
private