From 3b5d940fe5868af0f31989054e8fb7d2d9d11ec9 Mon Sep 17 00:00:00 2001 From: fatkodima Date: Mon, 5 Feb 2018 18:46:55 +0200 Subject: Add missing instrumentation to RedisCacheStore#read_multi --- activesupport/lib/active_support/cache/redis_cache_store.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'activesupport/lib/active_support') diff --git a/activesupport/lib/active_support/cache/redis_cache_store.rb b/activesupport/lib/active_support/cache/redis_cache_store.rb index 596541087f..c21ade8670 100644 --- a/activesupport/lib/active_support/cache/redis_cache_store.rb +++ b/activesupport/lib/active_support/cache/redis_cache_store.rb @@ -187,7 +187,11 @@ module ActiveSupport # fetched values. def read_multi(*names) if mget_capable? - read_multi_mget(*names) + instrument(:read_multi, names, options) do |payload| + read_multi_mget(*names).tap do |results| + payload[:hits] = results.keys + end + end else super end -- cgit v1.2.3