Method: ActiveSupport::Cache::Store#write

Defined in:
lib/active_support/cache.rb

#write(name, value, options = nil) ⇒ Object

Writes the value to the cache, with the key.

Options are passed to the underlying cache implementation.



360
361
362
363
364
365
366
# File 'lib/active_support/cache.rb', line 360

def write(name, value, options = nil)
  options = merged_options(options)
  instrument(:write, name, options) do |payload|
    entry = Entry.new(value, options)
    write_entry(namespaced_key(name, options), entry, options)
  end
end