method

write

rails latest stable - Class: ActiveSupport::Cache::FileStore

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.3.8) is shown here.

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