From 73a7ceef031dfa6def800af459135af1d82f36e4 Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Tue, 31 Mar 2009 08:52:46 -0500 Subject: [PATCH] Cache History Pages Implement caching for the "history" pages introduced in Revision 377. --- app/controllers/cache_sweeping_helper.rb | 2 +- app/controllers/wiki_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/cache_sweeping_helper.rb b/app/controllers/cache_sweeping_helper.rb index cfeacd48..5f8fb724 100644 --- a/app/controllers/cache_sweeping_helper.rb +++ b/app/controllers/cache_sweeping_helper.rb @@ -2,7 +2,7 @@ module CacheSweepingHelper def expire_cached_page(web, page_name) expire_action :controller => 'wiki', :web => web.address, - :action => %w(show published s5 tex print), :id => page_name + :action => %w(show published s5 tex print history), :id => page_name expire_action :controller => 'wiki', :web => web.address, :action => %w(show published), :id => page_name, :mode => 'diff' end diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb index 1f59a00e..5cda325e 100644 --- a/app/controllers/wiki_controller.rb +++ b/app/controllers/wiki_controller.rb @@ -9,7 +9,7 @@ class WikiController < ApplicationController before_filter :load_page 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, - :atom_with_content, :atom_with_headlines, :if => Proc.new { |c| c.send(:do_caching?) } + :history, :atom_with_content, :atom_with_headlines, :if => Proc.new { |c| c.send(:do_caching?) } cache_sweeper :revision_sweeper layout 'default', :except => [:atom_with_content, :atom_with_headlines, :atom, :tex, :s5, :export_html]