Why an edge cache
The origin object store may sit in one region, far from users. A content delivery network places caches at many edge locations worldwide. A read served from a nearby edge is faster and never touches the origin, cutting both latency and origin load.
How it serves objects
- On a cache miss the edge fetches the object from origin, stores it, and serves it.
- On a cache hit later requests in that region are served from the edge.
- A time to live and validation headers decide how long the edge may reuse a copy.
Keeping copies correct
Cached copies can go stale. Two patterns help. Versioned keys put a content hash in the URL so a changed object is a new URL the edge has never cached. Invalidation explicitly purges a key from edges, but it is slower and costlier, so immutable versioned URLs are usually preferred.
Key idea
A CDN caches objects at edges near users so reads skip the origin, and versioned URLs keep those cached copies correct without slow invalidation.