diff options
author | José Valim <jose.valim@gmail.com> | 2011-11-23 18:22:09 +0000 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-11-23 18:22:09 +0000 |
commit | 3ee0116c949dfc5760d60fe9c77168fb3868a4ec (patch) | |
tree | 988a2522a20b689cae2511aed6036d4769b3f7a3 /activesupport/test | |
parent | 2c568f1e45ef0704a87881750252731a3adff52c (diff) | |
download | rails-3ee0116c949dfc5760d60fe9c77168fb3868a4ec.tar.gz rails-3ee0116c949dfc5760d60fe9c77168fb3868a4ec.tar.bz2 rails-3ee0116c949dfc5760d60fe9c77168fb3868a4ec.zip |
Optimize cache expansion by skipping rails cache id in nested keys.
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/caching_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb index 8871b1b0e9..5d7464c623 100644 --- a/activesupport/test/caching_test.rb +++ b/activesupport/test/caching_test.rb @@ -12,11 +12,11 @@ class CacheKeyTest < ActiveSupport::TestCase begin ENV['RAILS_CACHE_ID'] = 'c99' assert_equal 'c99/foo', ActiveSupport::Cache.expand_cache_key(:foo) - assert_equal 'c99/c99/foo', ActiveSupport::Cache.expand_cache_key([:foo]) - assert_equal 'c99/c99/foo/c99/bar', ActiveSupport::Cache.expand_cache_key([:foo, :bar]) + assert_equal 'c99/foo', ActiveSupport::Cache.expand_cache_key([:foo]) + assert_equal 'c99/foo/bar', ActiveSupport::Cache.expand_cache_key([:foo, :bar]) assert_equal 'nm/c99/foo', ActiveSupport::Cache.expand_cache_key(:foo, :nm) - assert_equal 'nm/c99/c99/foo', ActiveSupport::Cache.expand_cache_key([:foo], :nm) - assert_equal 'nm/c99/c99/foo/c99/bar', ActiveSupport::Cache.expand_cache_key([:foo, :bar], :nm) + assert_equal 'nm/c99/foo', ActiveSupport::Cache.expand_cache_key([:foo], :nm) + assert_equal 'nm/c99/foo/bar', ActiveSupport::Cache.expand_cache_key([:foo, :bar], :nm) ensure ENV['RAILS_CACHE_ID'] = nil end |