aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/cache.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2012-01-27 20:43:49 +0100
committerDavid Heinemeier Hansson <david@loudthinking.com>2012-01-27 20:43:49 +0100
commitf78cb5583f77952aa35e063a660a11aad5f8de7f (patch)
tree785bce1ff5f2c167f16fe89c1888278efecf89e9 /activesupport/lib/active_support/cache.rb
parent66b445c319a217df2c0ac94f55760594aab63600 (diff)
downloadrails-f78cb5583f77952aa35e063a660a11aad5f8de7f.tar.gz
rails-f78cb5583f77952aa35e063a660a11aad5f8de7f.tar.bz2
rails-f78cb5583f77952aa35e063a660a11aad5f8de7f.zip
Inline the prefix assignment so it doesnt look so daft
Diffstat (limited to 'activesupport/lib/active_support/cache.rb')
-rw-r--r--activesupport/lib/active_support/cache.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb
index 5afc92059c..42b11b1daf 100644
--- a/activesupport/lib/active_support/cache.rb
+++ b/activesupport/lib/active_support/cache.rb
@@ -77,8 +77,7 @@ module ActiveSupport
def expand_cache_key(key, namespace = nil)
expanded_cache_key = namespace ? "#{namespace}/" : ""
- prefix = ENV["RAILS_CACHE_ID"] || ENV["RAILS_APP_VERSION"]
- if prefix
+ if prefix = ENV["RAILS_CACHE_ID"] || ENV["RAILS_APP_VERSION"]
expanded_cache_key << "#{prefix}/"
end