clear the undo cache at start and at end of op.