I want wget to use a global DNS cache, not just in memory for the current instance.
The wget manual mentions
Turn off caching of DNS lookups. Normally, Wget remembers the IP addresses it looked up from DNS so it doesn't have to repeatedly contact the DNS server for the same (typically small) set of hosts it retrieves from. This cache exists in memory only; a new Wget run will contact DNS again.
So I need a cache mechanism for wget. What do you recommend?
You could use any local DNS caching daemon like Dnsmasq or Bind in a caching-only configuration. Then the most recent responses will be cached locally and multiple instances of wget will not trigger extra queries over the network for the same names. Wget may be set to --no-dns-cache to save some memory at cost of performance.