diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2016-02-20 17:35:52 +0100 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2016-02-20 17:35:52 +0100 |
commit | c4a46fa781d39f1b4607cb1613a1c67fa044ce54 (patch) | |
tree | 54b03fef7180b5e540a719c974b539da8460bdef /activesupport/lib/active_support/cache | |
parent | b4558c10fb8f5379ffe23860c9ad1ee7a227de44 (diff) | |
download | rails-c4a46fa781d39f1b4607cb1613a1c67fa044ce54.tar.gz rails-c4a46fa781d39f1b4607cb1613a1c67fa044ce54.tar.bz2 rails-c4a46fa781d39f1b4607cb1613a1c67fa044ce54.zip |
Revert "Instrument read_multi".
Reevaluating the log output generated from this instrumentation,
we've found that it wasn't all that useful in practice.
```
Caches multi read:
- views/david/2/4184ab71db6849621a4d8820fcd2c0ad
- views/david/2/4184ab71db6849621a4d8820fcd2c0ad
- views/david/3/4184ab71db6849621a4d8820fcd2c0ad
- views/david/3/4184ab71db6849621a4d8820fcd2c0ad
```
If rendering many templates the output is inscrutable, and it's impossible
to see how many cache misses there were.
Revert ca6aba7f30 and implement a better way later.
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 |