Commit cache

* [ ] try this out in practice, check for bugs
* [ ] add tests
* [ ] analyse/document how this affects thread safety in forAllNodes