Refactor the new planning logic to actually clear the old cache on a replan