diff options
author | fatkodima <fatkodima123@gmail.com> | 2018-02-05 17:22:18 +0200 |
---|---|---|
committer | Jeremy Daer <jeremydaer@gmail.com> | 2018-02-05 13:51:55 -0800 |
commit | 83c1ed9a1a11196cab66d9c44a56a902ca0710e4 (patch) | |
tree | de096edb06212fed0a0efe83b167039bb60070bc /activesupport/lib/active_support | |
parent | 3b5d940fe5868af0f31989054e8fb7d2d9d11ec9 (diff) | |
download | rails-83c1ed9a1a11196cab66d9c44a56a902ca0710e4.tar.gz rails-83c1ed9a1a11196cab66d9c44a56a902ca0710e4.tar.bz2 rails-83c1ed9a1a11196cab66d9c44a56a902ca0710e4.zip |
Use Redis#mget for RedisCacheStore#fetch_multi
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/cache/redis_cache_store.rb | 8 |
1 files changed, 8 insertions, 0 deletions
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) |