Add distance cache