class Bootsnap::LoadPathCache::Store

def dump_data

def dump_data
  # Change contents atomically so other processes can't get invalid
  # caches if they read at an inopportune time.
  tmp = "#{@store_path}.#{(rand * 100000).to_i}.tmp"
  FileUtils.mkpath(File.dirname(tmp))
  File.binwrite(tmp, Snappy.deflate(MessagePack.dump(@data)))
  FileUtils.mv(tmp, @store_path)
end