Cache Sweeping
Expire cached revisions of deleted pages. Tweak the appearance of "history" page a bit.
This commit is contained in:
parent
69bfc1028b
commit
98918954e0
4 changed files with 16 additions and 1 deletions
|
@ -4,7 +4,7 @@ module CacheSweepingHelper
|
|||
expire_action :controller => 'wiki', :web => web.address,
|
||||
:action => %w(show published s5 tex print history), :id => page_name
|
||||
expire_action :controller => 'wiki', :web => web.address,
|
||||
:action => %w(show published), :id => page_name, :mode => 'diff'
|
||||
:action => 'show', :id => page_name, :mode => 'diff'
|
||||
end
|
||||
|
||||
def expire_cached_summary_pages(web)
|
||||
|
@ -25,4 +25,14 @@ module CacheSweepingHelper
|
|||
end
|
||||
end
|
||||
|
||||
def expire_cached_revisions(page)
|
||||
page.revisions.length.times do |i|
|
||||
revno = i+1
|
||||
expire_action :controller => 'wiki', :web => page.web.address,
|
||||
:action => 'revision', :id => page.name, :rev => revno
|
||||
expire_action :controller => 'wiki', :web => page.web.address,
|
||||
:action => 'revision', :id => page.name, :rev => revno, :mode => 'diff'
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue