aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/cache/memory_store.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2012-09-30 09:44:03 -0700
committerXavier Noria <fxn@hashref.com>2012-09-30 09:44:03 -0700
commit3b97f6d4850b79a22d0e573cedfc1abc42724659 (patch)
tree98277980150b888848b4f3cc2fed4ea79fe713b6 /activesupport/lib/active_support/cache/memory_store.rb
parentda27fa18cd3797e13aa550b2e367e6d05b7aa27d (diff)
parente3a746b6fc4a67986c0510dfe50ca064d90d5f37 (diff)
downloadrails-3b97f6d4850b79a22d0e573cedfc1abc42724659.tar.gz
rails-3b97f6d4850b79a22d0e573cedfc1abc42724659.tar.bz2
rails-3b97f6d4850b79a22d0e573cedfc1abc42724659.zip
Merge pull request #7800 from bdurand/optimize_cache_entry_take_2
Optimize ActiveSupport::Cache::Entry to reduce overhead
Diffstat (limited to 'activesupport/lib/active_support/cache/memory_store.rb')
-rw-r--r--activesupport/lib/active_support/cache/memory_store.rb1
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]