add undo cache