small fix for checking if cache save is required