- extracted a superclass for persisting messages

- added a changed flag to Cache
- safety checks for first frame in place