title: How does one include a module with cache expirations in sweepers?
body: <p>We have the following sweeper in a rails application:</p>
  
  <pre><code>class AgencyEquipmentTypeSweeper &lt; ActionController::Caching::Sweeper 
    observe AgencyEquipmentType
  
    #include ExpireOptions
    def after_update(agency_equipment_type)
      expire_options(agency_equipment_type)
    end
  
    def after_delete(agency_equipment_type)
      expire_options(agency_equipment_type)
    end
  
    def after_create(agency_equipment_type)
      expire_options(agency_equipment_type)
    end
  
    def expire_options(agency_equipment_type)
      Rails.cache.delete("agency_equipment_type_options/#{agency_equipment_type.agency_id}")
    end
  end
  </code></pre>
  
  <p>We'd like to extract the after_update, after_delete, and after_create callbacks to a module called "ExpireOptions"</p>
  
  <p>The module <em>should</em> look like this (with the 'expire_options' method staying behind in the
  original sweeper):</p>
  
  <pre><code>module ExpireOptions
    def after_update(record)
      expire_options(record)
    end
  
    def after_delete(record)
      expire_options(record)
    end
  
    def after_create(record)
      expire_options(record)
    end
  end
  
  class AgencyEquipmentTypeSweeper &lt; ActionController::Caching::Sweeper 
    observe AgencyEquipmentType
  
    include ExpireOptions
  
    def expire_options(agency_equipment_type)
      Rails.cache.delete("agency_equipment_type_options/#{agency_equipment_type.agency_id}")
    end
  end
  </code></pre>
  
  <p>BUT the cache expirations only work if we define the methods explicitly inside the sweeper. Is there an easy way to extract those callback methods to a module, and still have them work?</p>