fix check and save changes to cache