Cache Source View
Also, fix a cache-sweeping bug reported, long ago, by Toby Bartels.
This commit is contained in:
parent
1613973929
commit
dc3d202665
3 changed files with 5 additions and 4 deletions
|
@ -7,7 +7,8 @@ class RevisionSweeper < ActionController::Caching::Sweeper
|
|||
observe Revision, Page
|
||||
|
||||
def before_save(record)
|
||||
if record.is_a?(Revision)
|
||||
if record.is_a?(Revision)
|
||||
expire_cached_page(record.page.web, record.page.name)
|
||||
expire_cached_revisions(record.page)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue