diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2016-02-20 19:09:11 +0100 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2016-02-20 19:09:11 +0100 |
commit | e30897f8b948bd7248090518fca63895a19bd6e8 (patch) | |
tree | 1004c6a06e6e89840b36b63197dd42fcd28f5324 /activesupport/lib/active_support/cache | |
parent | e76891314126b10d5cf57aaf776dfa2a26553ec3 (diff) | |
parent | b4700de1ce21599b500d43d8138184ee7ae81407 (diff) | |
download | rails-e30897f8b948bd7248090518fca63895a19bd6e8.tar.gz rails-e30897f8b948bd7248090518fca63895a19bd6e8.tar.bz2 rails-e30897f8b948bd7248090518fca63895a19bd6e8.zip |
Merge pull request #23695 from kaspth/remove-automatic-collection-caching
Make collection caching explicit.
Diffstat (limited to 'activesupport/lib/active_support/cache')
-rw-r--r-- | activesupport/lib/active_support/cache/mem_cache_store.rb | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/activesupport/lib/active_support/cache/mem_cache_store.rb b/activesupport/lib/active_support/cache/mem_cache_store.rb index 174913365a..2ca4b51efa 100644 --- a/activesupport/lib/active_support/cache/mem_cache_store.rb +++ b/activesupport/lib/active_support/cache/mem_cache_store.rb @@ -96,16 +96,14 @@ module ActiveSupport options = names.extract_options! options = merged_options(options) - instrument_multi(:read, names, options) do - keys_to_names = Hash[names.map{|name| [normalize_key(name, options), name]}] - raw_values = @data.get_multi(keys_to_names.keys, :raw => true) - values = {} - raw_values.each do |key, value| - entry = deserialize_entry(value) - values[keys_to_names[key]] = entry.value unless entry.expired? - end - values + keys_to_names = Hash[names.map{|name| [normalize_key(name, options), name]}] + raw_values = @data.get_multi(keys_to_names.keys, :raw => true) + values = {} + raw_values.each do |key, value| + entry = deserialize_entry(value) + values[keys_to_names[key]] = entry.value unless entry.expired? end + values end # Increment a cached value. This method uses the memcached incr atomic |