lib/active_support/cache.rb in activesupport-2.1.0 vs lib/active_support/cache.rb in activesupport-2.1.1
- old
+ new
@@ -17,11 +17,11 @@
end
end
def self.expand_cache_key(key, namespace = nil)
expanded_cache_key = namespace ? "#{namespace}/" : ""
-
+
if ENV["RAILS_CACHE_ID"] || ENV["RAILS_APP_VERSION"]
expanded_cache_key << "#{ENV["RAILS_CACHE_ID"] || ENV["RAILS_APP_VERSION"]}/"
end
expanded_cache_key << case
@@ -29,9 +29,11 @@
key.cache_key
when key.is_a?(Array)
key.collect { |element| expand_cache_key(element) }.to_param
when key.respond_to?(:to_param)
key.to_param
+ else
+ key.to_s
end
expanded_cache_key
end