Efficiency
Introduce page.rev_ids, and use that, wherever possible, instead of page.revisions. This avoids fetching the text of all the revisions. D'oh!
This commit is contained in:
parent
c010e6b7a4
commit
7290e90631
8 changed files with 27 additions and 25 deletions
|
@ -26,7 +26,7 @@ module CacheSweepingHelper
|
|||
end
|
||||
|
||||
def expire_cached_revisions(page)
|
||||
page.revisions.count.times do |i|
|
||||
page.rev_ids.count.times do |i|
|
||||
revno = i+1
|
||||
expire_action :controller => 'wiki', :web => page.web.address,
|
||||
:action => 'revision', :id => page.name, :rev => revno
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue