Expire Pages that Include a Modified Page

Modifying a page should expire all pages that include it.
This commit is contained in:
Jacques Distler 2008-12-09 03:33:53 -06:00
parent 6e2d11e00d
commit 8f8c07505c

View file

@ -22,7 +22,8 @@ class RevisionSweeper < ActionController::Caching::Sweeper
def expire_caches(page)
expire_cached_summary_pages(page.web)
pages_to_expire = ([page.name] + WikiReference.pages_that_reference(page.web, page.name)).uniq
pages_to_expire = ([page.name] + WikiReference.pages_that_reference(page.web, page.name) +
WikiReference.pages_that_include(page.web, page.name)).uniq
pages_to_expire.each { |page_name| expire_cached_page(page.web, page_name) }
end