Use `DnsCacheKey` typedef (defined below) rather than `std::pair<int, std::string>`?  Better still just to define a new structure (so that it's explicit that the first is the type and the second is the domain)?