aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/cache.rb
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2015-11-20 04:11:56 -0200
committerRafael França <rafaelmfranca@gmail.com>2015-11-20 04:11:56 -0200
commitf6d12b8ea235e5b9c1d23edbff88765d7882ce94 (patch)
tree00d4419f9d3671541f9b6c110076ed0ba2b9a2b3 /activesupport/lib/active_support/cache.rb
parenteb9d4723f297b74cea3985c4a5685badb6fb758d (diff)
parenta8f773b05734b9a798ae9755d280ef95004ec711 (diff)
downloadrails-f6d12b8ea235e5b9c1d23edbff88765d7882ce94.tar.gz
rails-f6d12b8ea235e5b9c1d23edbff88765d7882ce94.tar.bz2
rails-f6d12b8ea235e5b9c1d23edbff88765d7882ce94.zip
Merge pull request #22332 from grosser/grosser/deprecation
add deprecations for a smooth transition after #22215
Diffstat (limited to 'activesupport/lib/active_support/cache.rb')
-rw-r--r--activesupport/lib/active_support/cache.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb
index 402a35e198..5011014e96 100644
--- a/activesupport/lib/active_support/cache.rb
+++ b/activesupport/lib/active_support/cache.rb
@@ -8,6 +8,7 @@ require 'active_support/core_ext/numeric/bytes'
require 'active_support/core_ext/numeric/time'
require 'active_support/core_ext/object/to_param'
require 'active_support/core_ext/string/inflections'
+require 'active_support/core_ext/string/strip'
module ActiveSupport
# See ActiveSupport::Cache::Store for documentation.
@@ -536,7 +537,14 @@ module ActiveSupport
key = "#{prefix}:#{key}" if prefix
key
end
- alias namespaced_key normalize_key
+
+ def namespaced_key(*args)
+ ActiveSupport::Deprecation.warn(<<-MESSAGE.strip_heredoc)
+ `namespaced_key` is deprecated and will be removed from Rails 5.1.
+ Please use `normalize_key` which will return a fully resolved key.
+ MESSAGE
+ normalize_key(*args)
+ end
def instrument(operation, key, options = nil)
log { "Cache #{operation}: #{normalize_key(key, options)}#{options.blank? ? "" : " (#{options.inspect})"}" }