> chunk component graph
yes. thanks for helping to clarify.
> > the chunk-graph does not change during gameplay
> that does technically change, because you can use landfill to fill up water and modify which positions a chunk component takes up
Yep, that might be a dealbreaker.
If the terrain only changes from impassable -> passable, not the other way around (e.g. flooding disconnecting bits), then the distances computed for the old map should be valid lower bounds for the distances on the new modified (by landfill) map, so it might be possible to use the old distances as an admissible a* heuristic to guide search to recompute new distances on the new modified map, but that's getting a bit fiddly.
This caching is likely the kind of thing that is probably not worth adding to the codebase unless you get a significant performance boost, as it adds a number of constraints from the required assumptions that impede you from changing the game rules in future