From f6bc5acf1006ef4c6cac03aee4b76d62e54465d4 Mon Sep 17 00:00:00 2001 From: Michael Grosser Date: Tue, 10 Nov 2015 09:13:54 -0800 Subject: keep deprecated namespaced_key in case any subclass uses it --- activesupport/lib/active_support/cache.rb | 1 + activesupport/lib/active_support/cache/file_store.rb | 2 +- activesupport/lib/active_support/cache/strategy/local_cache.rb | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'activesupport') diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb index e6482e5bd0..402a35e198 100644 --- a/activesupport/lib/active_support/cache.rb +++ b/activesupport/lib/active_support/cache.rb @@ -536,6 +536,7 @@ module ActiveSupport key = "#{prefix}:#{key}" if prefix key end + alias namespaced_key normalize_key def instrument(operation, key, options = nil) log { "Cache #{operation}: #{normalize_key(key, options)}#{options.blank? ? "" : " (#{options.inspect})"}" } diff --git a/activesupport/lib/active_support/cache/file_store.rb b/activesupport/lib/active_support/cache/file_store.rb index ef1f9a3851..9488b95214 100644 --- a/activesupport/lib/active_support/cache/file_store.rb +++ b/activesupport/lib/active_support/cache/file_store.rb @@ -60,7 +60,7 @@ module ActiveSupport matcher = key_matcher(matcher, options) search_dir(cache_path) do |path| key = file_path_key(path) - delete_entry(normalize_key(key, options), options) if key.match(matcher) + delete_entry(path, options) if key.match(matcher) end end end diff --git a/activesupport/lib/active_support/cache/strategy/local_cache.rb b/activesupport/lib/active_support/cache/strategy/local_cache.rb index aec33ad46b..46d5c6879d 100644 --- a/activesupport/lib/active_support/cache/strategy/local_cache.rb +++ b/activesupport/lib/active_support/cache/strategy/local_cache.rb @@ -123,7 +123,7 @@ module ActiveSupport super end - def set_cache_value(value, name, amount, options) # :nodoc: + def set_cache_value(name, value, options) # :nodoc: name = normalize_key(name, options) cache = local_cache cache.mute do -- cgit v1.2.3