Suggest an editImprove this articleRefine the answer for “What is DNS cache?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**DNS cache** is a **temporary store of DNS query results**, holding the mapping of **domain name -> IP address**, so that **DNS does not need to be queried again every time**. **Key point:** DNS cache exists at several levels at once (browser, OS, provider's DNS server), and how long it is kept is determined by TTL.Shown above the full answer for quick recall.Answer (EN)Image**DNS cache** is a **temporary store of DNS query results**, holding the mapping of **domain name -> IP address**, so that **DNS does not need to be queried again every time**. In simpler terms: **DNS cache is the "memory" where the computer and DNS servers remember DNS answers**. --- ## Why DNS cache is needed Without a cache, every time a site was opened, it would be necessary to: - ask the DNS server again - wait for the answer - create unnecessary load on the network DNS cache makes it possible to: - open sites **faster** - reduce the number of DNS queries - lower the load on DNS servers --- ## Where DNS cache exists DNS cache exists **at several levels**: ### 1. In the browser - the fastest - used for repeated visits to sites ### 2. In the operating system - shared by all applications - used by browsers, programs, services ### 3. At the provider's DNS server - serves thousands of users - significantly speeds up access to popular sites The same domain can be cached **in several places at once**. --- ## How DNS cache works (step by step) 1. You open the site `example.com` 2. DNS gets the IP address 3. The answer is stored in DNS cache 4. As long as **TTL has not expired**: - the cache is used - DNS servers are not queried 5. TTL expires -> the cache is cleared -> the request goes out again --- ## The relationship between DNS cache and TTL - **TTL** determines **how long a record stays in cache** - DNS cache **is not permanent** - after TTL, a record **is removed automatically** --- ## Possible problems with DNS cache Sometimes a cache can get in the way: - a site moved to a different IP - DNS was updated - but the cache still holds the old address In such cases: - a site may fail to open - it may open an "old version" The solution is to **clear the DNS cache**. --- ## Real-life example DNS cache is like: - a saved phone number - as long as the number has not changed, you call it right away - if the number changed, the record needs to be updated --- ## Short interview answer Remember this formulation: > **DNS cache is a temporary store of DNS answers that allows reusing the mapping between a domain name and an IP address without querying the DNS server again, speeding up network performance.**For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.