From e3a746b6fc4a67986c0510dfe50ca064d90d5f37 Mon Sep 17 00:00:00 2001 From: Brian Durand Date: Sun, 30 Sep 2012 09:26:04 -0700 Subject: Optimize ActiveSupport::Cache::Entry to reduce memory and processing overhead. --- activesupport/lib/active_support/cache/memory_store.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activesupport/lib/active_support/cache') diff --git a/activesupport/lib/active_support/cache/memory_store.rb b/activesupport/lib/active_support/cache/memory_store.rb index 7fd5e3b53d..4d26fb7e42 100644 --- a/activesupport/lib/active_support/cache/memory_store.rb +++ b/activesupport/lib/active_support/cache/memory_store.rb @@ -135,6 +135,7 @@ module ActiveSupport end def write_entry(key, entry, options) # :nodoc: + entry.dup_value! synchronize do old_entry = @data[key] return false if @data.key?(key) && options[:unless_exist] -- cgit v1.2.3