Skip to content

Commit

Permalink
Inline the prefix assignment so it doesnt look so daft
Browse files Browse the repository at this point in the history
  • Loading branch information
dhh committed Jan 27, 2012
1 parent 66b445c commit f78cb55
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions activesupport/lib/active_support/cache.rb
Expand Up @@ -77,8 +77,7 @@ def lookup_store(*store_option)
def expand_cache_key(key, namespace = nil) def expand_cache_key(key, namespace = nil)
expanded_cache_key = namespace ? "#{namespace}/" : "" expanded_cache_key = namespace ? "#{namespace}/" : ""


prefix = ENV["RAILS_CACHE_ID"] || ENV["RAILS_APP_VERSION"] if prefix = ENV["RAILS_CACHE_ID"] || ENV["RAILS_APP_VERSION"]
if prefix
expanded_cache_key << "#{prefix}/" expanded_cache_key << "#{prefix}/"
end end


Expand Down

0 comments on commit f78cb55

Please sign in to comment.