instance method
write
Ruby on Rails 4.1.16
Since v2.2.3Signature
write(name, value, options = nil)
Writes the value to the cache, with the key.
Options are passed to the underlying cache implementation.
Parameters
-
namereq -
valuereq -
optionsopt = nil
Source
# File activesupport/lib/active_support/cache.rb, line 384
def write(name, value, options = nil)
options = merged_options(options)
instrument(:write, name, options) do
entry = Entry.new(value, options)
write_entry(namespaced_key(name, options), entry, options)
end
end
Defined in activesupport/lib/active_support/cache.rb line 384
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Cache::Store