4 ms·
It's called the resolver cache, and Linux does it too. Most commonly with nscd (use "nscd -i hosts" to clear it, keep in mind this is not specific to DNS reques
by xorcist 10y ago
It's called the resolver cache, and Linux does it too. Most commonly with nscd (use "nscd -i hosts" to clear it, keep in mind this is not specific to DNS requests). In the specific situation of a web browser it's more complicated and you'll find that the web browser caches these things too. If you run Chrome check out chrome://net-internals to get a glimpse of what's going on there.
- Declanomous 10y agoThanks for the tip on net-internals. I think I used a similar feature in Firefox a long time ago, but I've never used this tool in Chrome before. I know Chrome in Linux definitely doesn't cache DNS requests. I believe Linux only keeps the DNS info around until the socket closes, but I don't know the actual implementation. I looked in to the ncsd man page, and it looks like DNS info isn't cached, only open sockets. I know Chrome uses the system DNS cache in Windows, and my understanding was that all browsers in Windows used the system DNS cache. I don't know a lot about how sockets are handled. I thought they were discarded as soon as they were closed, but they could function similarly to a DNS cache. I though a DNS cache stuck around for a lot longer though.
- ChoGGi 10y agoI have the DNS cache service on Windows 7 disabled, and Chrome still caches DNS requests.