From 4c9a3d4803e4a30e157b3b179f630e7f51f38625 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 8 Jan 2013 13:49:58 +0000 Subject: [PATCH] Disable caching of pages with dynamic layout Pages now feed back into the layout to set the content of the heading block so we can't cache any page which has a layout as that would mean the heading wouldn't appear when the cached page was used. --- app/controllers/diary_entry_controller.rb | 4 ++-- app/controllers/trace_controller.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/diary_entry_controller.rb b/app/controllers/diary_entry_controller.rb index d69d58df3..f218ea6bb 100644 --- a/app/controllers/diary_entry_controller.rb +++ b/app/controllers/diary_entry_controller.rb @@ -9,9 +9,9 @@ class DiaryEntryController < ApplicationController before_filter :check_database_writable, :only => [:new, :edit] before_filter :require_administrator, :only => [:hide, :hidecomment] - caches_action :list, :layout => false, :unless => :user_specific_list? +# caches_action :list, :layout => false, :unless => :user_specific_list? caches_action :rss, :layout => true - caches_action :view, :layout => false +# caches_action :view, :layout => false cache_sweeper :diary_sweeper, :only => [:new, :edit, :comment, :hide, :hidecomment] def new diff --git a/app/controllers/trace_controller.rb b/app/controllers/trace_controller.rb index 4b138bdae..14c64d2c6 100644 --- a/app/controllers/trace_controller.rb +++ b/app/controllers/trace_controller.rb @@ -16,8 +16,8 @@ class TraceController < ApplicationController before_filter :offline_redirect, :only => [:create, :edit, :delete, :data, :api_create, :api_delete, :api_data] around_filter :api_call_handle_error, :only => [:api_create, :api_read, :api_update, :api_delete, :api_data] - caches_action :list, :unless => :logged_in?, :layout => false - caches_action :view, :layout => false +# caches_action :list, :unless => :logged_in?, :layout => false +# caches_action :view, :layout => false caches_action :georss, :layout => true cache_sweeper :trace_sweeper, :only => [:create, :edit, :delete, :api_create, :api_update, :api_delete] cache_sweeper :tracetag_sweeper, :only => [:create, :edit, :delete, :api_create, :api_update, :api_delete] -- 2.43.2