CDNs cache content at edge locations worldwide:
How it works: User requests content
DNS routes to nearest edge server
Edge serves from cache (cache hit) or fetches from origin (cache miss)
Content cached for future requests
Benefits:
- Lower latency (content is closer)
- Reduced origin load
- DDoS protection
- TLS termination at edge
What to cache:
- Static assets (images, CSS, JS)
- API responses (with appropriate headers)
- Dynamic content (with edge computing)