Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How often does the DNS cache clear on a Windows 7 machine?

share|improve this question
up vote 22 down vote accepted

The DNS cache doesn't ever flush, unless you explicitly tell it to or you make a DNS/networking related configuration change. DNS records have a Time To Live (TTL) value associated with them which tells a DNS cache how long the particular record is good for. Records in the cache are kept for their TTL, then re-queried.

On a Windows machine you can see a list of all the records in your cache along with their TTL by executing the following command at the command prompt:

ipconfig /displaydns

You can force a flush of all cached DNS records using the following command:

ipconfig /flushdns

For more info:

share|improve this answer
    
Thanks for the great answer mate! – Harry Dec 9 '09 at 7:08
    
What kind of things constitute a "networking change"? A new IP address, joining a different wifi network? or manually flushing the cache / setting DNS – cutrightjm Feb 27 '15 at 1:01

From what I've been able to find, Windows 7 does not set a parameter for dnscache MaxCacheEntryTtlLimit.

The default value for MaxCacheEntryTtlLimit is DWORD = 0x15180 = 86400 seconds = 1 day

  • if DNS zone TTL < MaxCacheEntryTtlLimit, then DNS TTL is used
  • if DNS zone TTL > MaxCacheEntryTtlLimit, then MaxCacheEntryTtlLimit is used
share|improve this answer

According to: Reduce DNS Client Cache in Windows Server 2012 R2

Instead of MaxCacheEntryTtlLimit you should modify maxcacheTTL. It works for Windows 8 too.

Description

Determines how long the Domain Name System (DNS) server can save a record of a recursive name query.

If the value of this entry is 0x0, the DNS server does not save any records.

enter image description here

share|improve this answer
    
Thanks! Exactly what I was looking for. One more thing to add from that blog post run net stop dnscache & net start dnscache to make setting take without rebooting. – Lucas Jul 11 '14 at 9:50
    
For what it looks like, maxcacheTTL is for the "DNS server" component of Windows Server, not for the DNS Cache. – Jeroen Landheer Aug 7 '15 at 7:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .