Add topology cache tests.
Support calculation of reverse path tree.