Cache
Definition
A temporary storage layer that saves copies of frequently accessed data so future requests can be served faster without recomputing or re-fetching the data.
A cache is a high-speed storage mechanism that stores copies of data so that future requests for that data can be served more quickly. Caching exists at multiple levels: browser cache (stores web assets locally), CDN cache (stores content at edge servers), application cache (stores computed results), and CPU cache (stores frequently accessed memory).
Web caching strategies include setting appropriate Cache-Control headers, using ETags for validation, implementing service workers for offline caching, and leveraging CDNs for static asset distribution. Proper caching can reduce server load by 50-90% and dramatically improve page load times.
Cache invalidation, determining when cached data is stale and needs refreshing, is famously one of the two hard problems in computer science. Strategies include time-based expiration (TTL), event-based invalidation, and cache-aside patterns where the application manages cache updates explicitly.
Related Calculators
Related Terms
CDN (Content Delivery Network)
techA geographically distributed network of servers that delivers web content to users from the nearest location, reducing latency and improving load times.
HTTP (HyperText Transfer Protocol)
techThe foundational protocol for data communication on the web, defining how messages are formatted and transmitted between clients and servers.
DNS (Domain Name System)
techThe internet's phone book that translates human-readable domain names like example.com into numerical IP addresses that computers use to communicate.
Latency
techThe time delay between a user's action and the system's response, measured in milliseconds, critical for user experience and application performance.
Related Articles
JSON Formatting Best Practices: Write Clean, Valid JSON
Master JSON formatting with best practices for syntax, nesting, and validation. Learn common errors, debugging tips, and how to write clean JSON data.
Regex Cheat Sheet: Essential Patterns Every Developer Needs
A practical regex reference guide with common patterns for emails, URLs, phone numbers, and more. Includes syntax explanations and real-world examples.
How to Generate Secure Passwords: Best Practices for 2026
Learn how to create strong, secure passwords that protect your accounts. Covers password length, complexity, managers, and multi-factor authentication.
Guide to QR Codes: How They Work, Types & Best Uses
Learn how QR codes work, the different types available, and best practices for creating and using them in marketing, payments, and information sharing.