Sincerely, I don't know what I should cache. My initial thought is creating a hashmap with key being the source node, and value something that allows me to easily retrieve the path.
What do you think I need to cache? Does it suffices to have a map from node index (std::size_t) to the node's predecessor map?