Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki
This commit is contained in:
commit
5899e19611
3 changed files with 5 additions and 4 deletions
|
@ -2,7 +2,7 @@ module CacheSweepingHelper
|
||||||
|
|
||||||
def expire_cached_page(web, page_name)
|
def expire_cached_page(web, page_name)
|
||||||
expire_action :controller => 'wiki', :web => web.address,
|
expire_action :controller => 'wiki', :web => web.address,
|
||||||
:action => %w(show published s5 tex print history), :id => page_name
|
:action => %w(show published s5 tex print history source), :id => page_name
|
||||||
expire_action :controller => 'wiki', :web => web.address,
|
expire_action :controller => 'wiki', :web => web.address,
|
||||||
:action => 'show', :id => page_name, :mode => 'diff'
|
:action => 'show', :id => page_name, :mode => 'diff'
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,6 +8,7 @@ class RevisionSweeper < ActionController::Caching::Sweeper
|
||||||
|
|
||||||
def before_save(record)
|
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)
|
expire_cached_revisions(record.page)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -9,7 +9,7 @@ class WikiController < ApplicationController
|
||||||
|
|
||||||
before_filter :load_page
|
before_filter :load_page
|
||||||
before_filter :dnsbl_check, :only => [:edit, :new, :save, :export_html, :export_markup]
|
before_filter :dnsbl_check, :only => [:edit, :new, :save, :export_html, :export_markup]
|
||||||
caches_action :show, :published, :authors, :tex, :s5, :print, :recently_revised, :list, :file_list,
|
caches_action :show, :published, :authors, :tex, :s5, :print, :recently_revised, :list, :file_list, :source,
|
||||||
:history, :revision, :atom_with_content, :atom_with_headlines, :if => Proc.new { |c| c.send(:do_caching?) }
|
:history, :revision, :atom_with_content, :atom_with_headlines, :if => Proc.new { |c| c.send(:do_caching?) }
|
||||||
cache_sweeper :revision_sweeper
|
cache_sweeper :revision_sweeper
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue