instiki/app/controllers/cache_sweeping_helper.rb
Jacques Distler 493803cfd1 Atom Feeds (bis)
Remove some vestiges of RSS 2.0.
2007-04-13 17:20:14 -05:00

25 lines
938 B
Ruby

module CacheSweepingHelper
def expire_cached_page(web, page_name)
expire_action :controller => 'wiki', :web => web.address,
:action => %w(show published s5 tex print), :id => page_name
expire_action :controller => 'wiki', :web => web.address,
:action => %w(show published), :id => page_name, :mode => 'diff'
end
def expire_cached_summary_pages(web)
categories = WikiReference.find(:all, :conditions => "link_type = 'C'")
%w(recently_revised list).each do |action|
expire_action :controller => 'wiki', :web => web.address, :action => action
categories.each do |category|
expire_action :controller => 'wiki', :web => web.address, :action => action, :category => category.referenced_name
end
end
%w(authors atom_with_content atom_with_headlines).each do |action|
expire_action :controller => 'wiki', :web => web.address, :action => action
end
end
end