Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question

3 Answers 3

up vote 18 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

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.


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

Your Answer


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.