instance method
write_multi
Ruby on Rails 6.1.7.10
Since v5.2.8.1Signature
write_multi(hash, options = nil)
Cache Storage API to write multiple values at once.
Parameters
-
hashreq -
optionsopt = nil
Source
# File activesupport/lib/active_support/cache.rb, line 406
def write_multi(hash, options = nil)
options = merged_options(options)
instrument :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
Defined in activesupport/lib/active_support/cache.rb line 406
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Cache::Store