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:
Jacques Distler 2011-04-25 10:54:44 -05:00
parent c010e6b7a4
commit 7290e90631
8 changed files with 27 additions and 25 deletions

View file

@ -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