Only try to save distance cache in redis if there are actual distances