From ade40e80ba5bc74fd1ebffe7b3dad6aa32f872d1 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 21 Mar 2010 20:45:24 +0200 Subject: [PATCH] - Fixed 'fragment_cache_store'/'cache_store' rename in Rails version used in Redmine 0.9.x, now plugin should support properly both 0.8.x and 0.9.x versions. --- app/views/wiki_external_filter/_settings.html.erb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/views/wiki_external_filter/_settings.html.erb b/app/views/wiki_external_filter/_settings.html.erb index 3ba45d2..61d1687 100644 --- a/app/views/wiki_external_filter/_settings.html.erb +++ b/app/views/wiki_external_filter/_settings.html.erb @@ -4,18 +4,22 @@ <%= text_field_tag 'settings[cache_seconds]', @settings['cache_seconds'] %> seconds

- Enter zero to disable caching. Make sure to configure fragment_cache_store if you use the value > 0. + Enter zero to disable caching. Make sure to configure cache_store if you use the value > 0.

- Configuration example for ActiveSupport::Cache::FileStore, config/environments/production.rb file:
+ Configuration example for ActiveSupport::Cache::FileStore, config/environments/production.rb file:

...
- config.action_controller.fragment_cache_store = :file_store, "#{RAILS_ROOT}/cache"
+ config.action_controller.cache_store = :file_store, "#{RAILS_ROOT}/cache"
...

+

+ Note: use 'fragment_cache_store' instead of 'cache_store' for Redmine 0.8.x. +

Current cache settings are:
ActionController::Base.cache_configured? = <%= h ActionController::Base.cache_configured? ? "true" : "false" %>
- ActionController::Base.fragment_cache_store = <%= h ActionController::Base.fragment_cache_store.inspect %> + <% cache_store = ActionController::Base.respond_to?('fragment_cache_store=') ? ActionController::Base.fragment_cache_store : ActionController::Base.cache_store %> + ActionController::Base.cache_store = <%= h cache_store.inspect %>