public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
mephisto / lib / mephisto / sweeper_methods.rb
100644 18 lines (17 sloc) 0.625 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
module Mephisto
  module SweeperMethods
    def expire_overview_feed!
      if Site.cache_sweeper_tracing
        controller.logger.warn "Expiring Overview Feed: #{overview_path}"
      end
      controller.class.expire_page overview_path
    end
 
    def expire_assigned_sections!(record)
      record.send :save_assigned_sections
      record.sections.each do |section|
        controller.expire_page :path => section.to_url, :controller => '/mephisto', :action => 'dispatch'
        controller.expire_page :sections => section.to_feed_url, :controller => '/feed', :action => 'feed'
      end
    end
  end
end