Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I want wget to use a global DNS cache, not just in memory for the current instance.

The wget manual mentions

--no-dns-cache
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?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.