mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Generate keys
instead of keys_to_names
`keys_to_names` is used only for `keys_to_names.keys`.
This commit is contained in:
parent
83cb0fc632
commit
125095c2d5
1 changed files with 3 additions and 3 deletions
|
@ -300,10 +300,10 @@ module ActiveSupport
|
|||
options = names.extract_options!
|
||||
options = merged_options(options)
|
||||
|
||||
keys_to_names = names.map { |name| [ normalize_key(name, options), name ] }.to_h
|
||||
values = redis.mget(*keys_to_names.keys)
|
||||
keys = names.map { |name| normalize_key(name, options) }
|
||||
values = redis.mget(*keys)
|
||||
|
||||
keys_to_names.zip(values).each_with_object({}) do |((_, name), value), results|
|
||||
names.zip(values).each_with_object({}) do |(name, value), results|
|
||||
if value
|
||||
entry = deserialize_entry(value)
|
||||
unless entry.nil? || entry.expired? || entry.mismatched?(normalize_version(name, options))
|
||||
|
|
Loading…
Reference in a new issue