<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>actionpack/lib/action_controller/caching/sweeper.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -27,7 +27,7 @@ module ActionController #:nodoc:
     autoload :Actions, 'action_controller/caching/actions'
     autoload :Fragments, 'action_controller/caching/fragments'
     autoload :Pages, 'action_controller/caching/pages'
-    autoload :Sweeper, 'action_controller/caching/sweeping'
+    autoload :Sweeper, 'action_controller/caching/sweeper'
     autoload :Sweeping, 'action_controller/caching/sweeping'
 
     def self.included(base) #:nodoc:</diff>
      <filename>actionpack/lib/action_controller/caching.rb</filename>
    </modified>
    <modified>
      <diff>@@ -51,47 +51,5 @@ module ActionController #:nodoc:
         end
       end
     end
-
-    if defined?(ActiveRecord) and defined?(ActiveRecord::Observer)
-      class Sweeper &lt; ActiveRecord::Observer #:nodoc:
-        attr_accessor :controller
-
-        def before(controller)
-          self.controller = controller
-          callback(:before) if controller.perform_caching
-        end
-
-        def after(controller)
-          callback(:after) if controller.perform_caching
-          # Clean up, so that the controller can be collected after this request
-          self.controller = nil
-        end
-
-        protected
-          # gets the action cache path for the given options.
-          def action_path_for(options)
-            ActionController::Caching::Actions::ActionCachePath.path_for(controller, options)
-          end
-
-          # Retrieve instance variables set in the controller.
-          def assigns(key)
-            controller.instance_variable_get(&quot;@#{key}&quot;)
-          end
-
-        private
-          def callback(timing)
-            controller_callback_method_name = &quot;#{timing}_#{controller.controller_name.underscore}&quot;
-            action_callback_method_name     = &quot;#{controller_callback_method_name}_#{controller.action_name}&quot;
-
-            __send__(controller_callback_method_name) if respond_to?(controller_callback_method_name, true)
-            __send__(action_callback_method_name)     if respond_to?(action_callback_method_name, true)
-          end
-
-          def method_missing(method, *arguments, &amp;block)
-            return if @controller.nil?
-            @controller.__send__(method, *arguments, &amp;block)
-          end
-      end
-    end
   end
 end</diff>
      <filename>actionpack/lib/action_controller/caching/sweeping.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>49169f7a6ab2699c500032e6e14570512c674274</id>
    </parent>
  </parents>
  <author>
    <name>Wincent Colaiuta</name>
    <login>wincent</login>
    <email>win@wincent.com</email>
  </author>
  <url>http://github.com/rails/rails/commit/5ac05f15c6d8f496c4e152dbbecd8ccb12041770</url>
  <id>5ac05f15c6d8f496c4e152dbbecd8ccb12041770</id>
  <committed-date>2009-05-04T18:17:27-07:00</committed-date>
  <authored-date>2009-05-04T18:17:27-07:00</authored-date>
  <message>Extract ActionController::Caching::Sweeper into separate file [#1977 state:resolved]

Signed-off-by: Joshua Peek &lt;josh@joshpeek.com&gt;</message>
  <tree>d2ca0903dbc8aabfba64a31685f97f7688575f3b</tree>
  <committer>
    <name>Joshua Peek</name>
    <login>josh</login>
    <email>josh@joshpeek.com</email>
  </committer>
</commit>
