better cache check and update tests