Split update_cache from line_insdel as it really needs to be