instance method
write
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
write(name, value, options = nil)
No documentation comment.
Parameters
-
namereq -
valuereq -
optionsopt = nil
Source
# File activesupport/lib/active_support/cache/file_store.rb, line 16
def write(name, value, options = nil)
super
ensure_cache_path(File.dirname(real_file_path(name)))
File.atomic_write(real_file_path(name), cache_path) { |f| Marshal.dump(value, f) }
value
rescue => e
logger.error "Couldn't create cache directory: #{name} (#{e.message})" if logger
end
Defined in activesupport/lib/active_support/cache/file_store.rb line 16
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Cache::FileStore