Improved cache sweeping for All Pages and Recently Revised (categories stuff again)
This commit is contained in:
parent
2a91464aa8
commit
56dc390ddb
1 changed files with 10 additions and 4 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue