We don't care about the actual ordering, so let's do the cheapest
comparisons first then the quite expensive DNSName comparison only
if we really need to.
(cherry picked from commit
186e99c98d195329af05129cd4d6512657edf4bc)
uint16_t type;
DNSResourceRecord::Place place;
bool operator<(const CacheKey& rhs) const {
- return tie(name, type, place) < tie(rhs.name, rhs.type, rhs.place);
+ return tie(type, place, name) < tie(rhs.type, rhs.place, rhs.name);
}
};
typedef map<CacheKey, CacheEntry> tcache_t;