introduce a pathCache for various costly and constantly repeating tasks