There is a part of GNU libc called “nscd”, the name service caching daemon. It can cache username, group and host information as configured in /etc/nsswitch.conf and /etc/nscd.conf. However, it really only caches responses to syscalls like getpwnam() or gethostbyname() (and others as listed in man nscd). This means that it can cache DNS information, but without knowing about DNS TTL values. It also will be bypassed for hostname lookups UNLESS gethostbyname() is called and that function is old and busted. The new hotness is getaddrinfo() as described:
http://people.redhat.com/drepper/userapi-ipv6.html
http://udrepper.livejournal.com/16116.html
Point is, you DO need a local caching DNS server to handle DNS requests, e.g. http://ubuntu.wordpress.com/2006/08/02/local-dns-cache-for-faster-browsing/ and you can’t just use nscd as some of the comments suggest.