Every time you need to store the existing state of an object in order to be able to restore it later, you can probably leverage the memento pattern. The main advantage of this pattern is the opacity of the state. The CareTaker isn't really dependent on the Memento type, as we've seen.
The protocols we showed can serve as a basis for your custom implementations. Following this pattern lets you implement multiple CareTaker objects with different features.
Just to note, in our example, the restoration process means that any redo information is lost. It would be possible to keep this information until the next save call by not popping last, but simply moving the current restoration point. Once again, it depends on your needs and the implementation of the CareTaker you're looking for.