Improved cache sweeping for All Pages and Recently Revised (categories stuff again)

This commit is contained in:
Alexey Verkhovsky 2006-04-02 05:47:41 +00:00
parent 2a91464aa8
commit 56dc390ddb

View file

@ -23,10 +23,16 @@ class RevisionSweeper < ActionController::Caching::Sweeper
:action => %w(show published), :id => page_name :action => %w(show published), :id => page_name
end end
expire_action :controller => 'wiki', :web => web.address, categories = WikiReference.find(:all, :conditions => "link_type = 'C'")
:action => %w(authors recently_revised list) %w(recently_revised list).each do |action|
expire_fragment :controller => 'wiki', :web => web.address, expire_action :controller => 'wiki', :web => web.address, :action => action
:action => %w(rss_with_headlines rss_with_content) categories.each do |category|
expire_action :controller => 'wiki', :web => web.address, :action => action, :category => category.referenced_name
end
end
expire_action :controller => 'wiki', :web => web.address, :action => 'authors'
expire_fragment :controller => 'wiki', :web => web.address, :action => %w(rss_with_headlines rss_with_content)
end end
end end