How often does the DNS cache clear?
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:
- Wikipedia article on DNS and TTLs
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
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.