# File lib/fsdb/database.rb, line 432
  def insert(path, object)
    abs_path = absolute(path)
    file_id = make_file_id(abs_path)
    object_exclusive file_id do |cache_entry|
      open_write_lock(abs_path) do |f|
        dump(object, f)
        cache_entry.update(f.mtime, inc_version_of(f, cache_entry), object)
        object
      end
    end
  ensure
    clear_entry(file_id) # no one else can get this copy of object
  end