fixing expired cache logic

The logic for updated hosted services was wrong, this fixes it