method
write
rails latest stable - Class:
ActiveSupport::Cache::FileStore
write(name, value, options = nil)public
No documentation available.
# 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