Update policy distances

This fixes #574. As it's an important function, I'd like a review.

One thing I'm not sure on is if we should refresh the cache daily, given it should be updated as things change with the callbacks. Running an update took 26 minutes on my machine so it's not a cheap operation either.