diff options
author | Brian Durand <brian@embellishedvisions.com> | 2012-09-30 09:26:04 -0700 |
---|---|---|
committer | Brian Durand <brian@embellishedvisions.com> | 2012-09-30 09:26:04 -0700 |
commit | e3a746b6fc4a67986c0510dfe50ca064d90d5f37 (patch) | |
tree | 98277980150b888848b4f3cc2fed4ea79fe713b6 /activesupport/lib/active_support/cache | |
parent | da27fa18cd3797e13aa550b2e367e6d05b7aa27d (diff) | |
download | rails-e3a746b6fc4a67986c0510dfe50ca064d90d5f37.tar.gz rails-e3a746b6fc4a67986c0510dfe50ca064d90d5f37.tar.bz2 rails-e3a746b6fc4a67986c0510dfe50ca064d90d5f37.zip |
Optimize ActiveSupport::Cache::Entry to reduce memory and processing overhead.
Diffstat (limited to 'activesupport/lib/active_support/cache')
-rw-r--r-- | activesupport/lib/active_support/cache/memory_store.rb | 1 |
1 files changed, 1 insertions, 0 deletions
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] |