instance method
read_multi_entries
Ruby on Rails 8.0.4
Since v5.2.8.1 PrivateSignature
read_multi_entries(names, **options)
No documentation comment.
Parameters
-
namesreq -
optionskeyrest
Source
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 330
def read_multi_entries(names, **options)
options = merged_options(options)
return {} if names == []
raw = options&.fetch(:raw, false)
keys = names.map { |name| normalize_key(name, options) }
values = failsafe(:read_multi_entries, returning: {}) do
redis.then { |c| c.mget(*keys) }
end
names.zip(values).each_with_object({}) do |(name, value), results|
if value
entry = deserialize_entry(value, raw: raw)
unless entry.nil? || entry.expired? || entry.mismatched?(normalize_version(name, options))
begin
results[name] = entry.value
rescue DeserializationError
end
end
end
end
end
Defined in activesupport/lib/active_support/cache/redis_cache_store.rb line 330
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Cache::RedisCacheStore