write_multi(hash, options = nil)
public
Cache Storage API to write multiple values at
once.
# File activesupport/lib/active_support/cache.rb, line 551
def write_multi(hash, options = nil)
return hash if hash.empty?
options = merged_options(options)
instrument_multi :write_multi, hash, options do |payload|
entries = hash.each_with_object({}) do |(name, value), memo|
memo[normalize_key(name, options)] = Entry.new(value, **options.merge(version: normalize_version(name, options)))
end
write_multi_entries entries, **options
end
end