        remote_cache_path = self._get_remote_cache_filepath(
            dataset_id=dataset_id, dataset_version=dataset_version
        )
        with self._rw_client.write_lock(
            storage_type=self._storage_type,
            bucket=self._configurations.bucket,
            cache_path=remote_cache_path,
        ):
            # It is possible that the cache was created while
            # the write lock was being acquired.
            if not self._is_cloud_cache_present(
                dataset_id=dataset_id, dataset_version=dataset_version
            ):
                with self._lock_local_cache(
                    dataset_id=dataset_id,