aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/cache.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2012-01-27 20:41:37 +0100
committerDavid Heinemeier Hansson <david@loudthinking.com>2012-01-27 20:44:08 +0100
commit83dbef6074269c3eb742c0506476b3679707dedd (patch)
tree46c0cf37bbcc7dc4c4cadfd2ae1ffc1a1ede9b00 /activesupport/lib/active_support/cache.rb
parent69816a830bb2f5c0df1f8f4a6f97fd951e5edb9d (diff)
downloadrails-83dbef6074269c3eb742c0506476b3679707dedd.tar.gz
rails-83dbef6074269c3eb742c0506476b3679707dedd.tar.bz2
rails-83dbef6074269c3eb742c0506476b3679707dedd.zip
Revert "Fix expanding cache key for single element arrays"
This reverts commit abe915f23777efe10f17d611bf5718ca855a0704. This broke all existing keys and it's wrong anyway. The array is just there as a convenience option for building the string. It's intentional that [ "stuff"] and "stuff" generates the same key.
Diffstat (limited to 'activesupport/lib/active_support/cache.rb')
-rw-r--r--activesupport/lib/active_support/cache.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb
index 7d032ca984..9711ed6f73 100644
--- a/activesupport/lib/active_support/cache.rb
+++ b/activesupport/lib/active_support/cache.rb
@@ -91,7 +91,7 @@ module ActiveSupport
def retrieve_cache_key(key)
case
when key.respond_to?(:cache_key) then key.cache_key
- when key.is_a?(Array) then ['Array', *key.map { |element| retrieve_cache_key(element) }].to_param
+ when key.is_a?(Array) then key.map { |element| retrieve_cache_key(element) }.to_param
else key.to_param
end.to_s
end