From 83c1ed9a1a11196cab66d9c44a56a902ca0710e4 Mon Sep 17 00:00:00 2001 From: fatkodima Date: Mon, 5 Feb 2018 17:22:18 +0200 Subject: Use Redis#mget for RedisCacheStore#fetch_multi --- activesupport/lib/active_support/cache/redis_cache_store.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'activesupport/lib/active_support/cache') diff --git a/activesupport/lib/active_support/cache/redis_cache_store.rb b/activesupport/lib/active_support/cache/redis_cache_store.rb index c21ade8670..af14c28408 100644 --- a/activesupport/lib/active_support/cache/redis_cache_store.rb +++ b/activesupport/lib/active_support/cache/redis_cache_store.rb @@ -307,6 +307,14 @@ module ActiveSupport end end + def read_multi_entries(names, _options) + if mget_capable? + read_multi_mget(*names) + else + super + end + end + def read_multi_mget(*names) options = names.extract_options! options = merged_options(options) -- cgit v1.2.3