def METHOD_NAME(self, sources: Iterable[Path]) -> None:
    """Update the cache file data and write a new cache file."""
    self.file_data.update(
        **{str(src.resolve()): Cache.get_file_data(src) for src in sources}
    )
    try:
        CACHE_DIR.mkdir(parents=True, exist_ok=True)
        with tempfile.NamedTemporaryFile(
            dir=str(self.cache_file.parent), delete=False
        ) as f:
            pickle.dump(self.file_data, f, protocol=4)
        os.replace(f.name, self.cache_file)
    except OSError:
        pass