A cache is a temporary storage layer that keeps copies of frequently accessed data so it can be retrieved faster next time. Imagine keeping your most-used textbooks on your desk instead of walking to the bookshelf every time you need them. The desk is your cache - it holds a small amount of data that you can grab instantly, saving the time of fetching it from the original source.
Browser cache is the most familiar type. When you visit a website for the first time, your browser downloads and saves images, CSS files, JavaScript, and other assets locally. On your next visit, the browser loads these saved files instead of downloading them again, making the page appear much faster. This is one reason why websites you visit regularly load more quickly after the first visit.
DNS cache is another important example. When your browser translates a domain name (like google.com) into an IP address, it stores the result in a local cache. The next time you visit the same domain, the browser skips the DNS lookup entirely and uses the cached IP address, shaving milliseconds off the connection time.
Every cached item has an expiration period: DNS records carry a TTL (Time To Live), and web files use settings such as the max-age value of the Cache-Control header. For web files, when that period ends, the data becomes stale, but it is not simply thrown away: the browser asks the server whether the file has changed and keeps using its copy if it has not. Web developers set these periods per file - static assets like logos might be cached for months, while dynamic content might be kept for just minutes.
Cache behavior has interesting implications for short URLs. When a browser caches a 301 (permanent) redirect, subsequent clicks on the same short URL bypass the shortening service's server entirely - the browser redirects directly to the destination. This is faster for the user but means the shortening service cannot count those repeat clicks in its analytics. Under the HTTP specification, a 302 (temporary) redirect is not cached by default, so each click on it reaches the shortening service.
Occasionally, cached data causes problems. If a website updates its content but your browser still shows the old cached version, you can force a fresh load with a shortcut such as Ctrl+F5 (the keys vary by browser). This tells the browser to ignore its cache and download everything from scratch.