From a938d582b132e98271b3c8e97220b8f782684668 Mon Sep 17 00:00:00 2001 From: Holger Just Date: Mon, 16 Jan 2012 14:53:51 +0100 Subject: [PATCH] [#780] Clarify deprecation of Setting.clear_cache --- app/models/setting.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/setting.rb b/app/models/setting.rb index 2c70e39a..101595ad 100644 --- a/app/models/setting.rb +++ b/app/models/setting.rb @@ -140,6 +140,7 @@ class Setting < ActiveRecord::Base # Deprecation Warning: This method is no longer available. There is no # replacement. def self.check_cache + # DEPRECATED SINCE 3.0.0beta2 ActiveSupport::Deprecation.warn "The Setting.check_cache method is " + "deprecated and will be removed in the future. There should be no " + "replacement for this functionality needed." @@ -147,9 +148,12 @@ class Setting < ActiveRecord::Base # Clears all of the Setting caches def self.clear_cache + # DEPRECATED SINCE 3.0.0beta2 ActiveSupport::Deprecation.warn "The Setting.clear_cache method is " + "deprecated and will be removed in the future. There should be no " + - "replacement for this functionality needed." + "replacement for this functionality needed. To sweep the whole " + + "cache Rails.cache.clear may be used. To invalidate the Settings " + + "only, you may use Setting.first.try(:touch)" end private