View Single Post
  #3  
Old July 4th 16, 03:12 PM posted to alt.windows7.general,microsoft.public.windowsxp.general
Char Jackson
external usenet poster
 
Posts: 10,449
Default Windows DNS cache (was: Why does Firefox not respect the HOSTS file in Windows)

On Sat, 2 Jul 2016 09:31:22 +0100, "J. P. Gilliver (John)"
wrote:

In message , Char Jackson
writes:
[]
You can view the Windows DNS cache with the following command:

ipconfig /displaydns


Thanks, interesting.

By repeatedly running the following command, which simply pulls out the Time
To Live (TTL) values for easier visibility, you can see the TTL starting
values as well as seeing the TTL count down toward zero. When it hits zero,
the DNS entry is removed from the cache.

ipconfig /displaydns | find "Time To Live"

Lastly, for testing purposes, you can clear the Windows DNS cache with the
following command:

ipconfig /flushdns

There are no ill effects as a result of clearing the cache. It simply
rebuilds over time, as necessary.

I did it, and (I'm running XP) it said

Successfully flushed the DNS Resolver Cache.

I then did ipconfig /displaydns | find "Time To Live" again, and it
looked to still have the same number of lines; doing it without the pipe
to "find" (piping to "more" instead) looks the same, too.



The primary intent of that command string was to highlight the TTL of the
various cache entries and to illustrate how the TTL decrements to zero,
followed by the cache entry being removed. Having said that, if there are
cache entries that are simply waiting to time out (not corresponding to any
current network activity, for example), then a flush should clear them and
they won't immediately reappear. However, if you have current network
activity, then clearing the cache might indeed appear to be very temporary.
I'd expect to see a refresh of the TTL, though. The command string above
would highlight that.

--

Char Jackson
Ads