I am attempting to reponen bug 196241 I am running glibc-2.13-r2 and confirm the results of the wireshark test described in that bug report. For names which resolve to a single IP (www.gentoo.org) the DNS result is cached by nscd and subsequent lookups do not trigger a request to the DNS server. But for names which resolve to multiple IPs (www.google.com) the nscd does not cache results, and every access results in another hit on the DNS server, which somewhat limits the usefulness of nscd. Reproducible: Always
Looking into this a bit deeper, I suppose it is working as designed. I find the following comment in glibc-2.13/nscd/hstcache.c /* If the record contains more than one IP address (used for load balancing etc) don't cache the entry. This is something the current cache handling cannot handle and it is more than questionable whether it is worthwhile complicating the cache handling just for handling such a special case. */
*** This bug has been marked as a duplicate of bug 196241 ***