CDN & Performance

What is Cache Invalidation?

Also known as: Cache Purge

Definition

Cache invalidation is the explicit removal of stored web objects from a cache so that new requests must revalidate or refetch them from the origin server.

Cache invalidation is the process of deleting or marking as stale specific cached objects so that subsequent requests bypass the cache and retrieve a fresh copy from the origin server. Unlike a TTL-based expiration, which lets the cache hold an object until a configured time limit passes, invalidation is an immediate, on-demand action. It is commonly triggered by a content update, a bugfix, or a security change that must be reflected to users without waiting for existing TTL values to expire.

When a cache receives an invalidation request, it typically purges the object from its storage or marks it with a new expiry time of zero. The next client request for that object will then result in a cache miss, forcing the edge or proxy to forward the request to the origin. The origin returns the new content, which is then stored in the cache until its next invalidation or its TTL expires. Cache invalidation operations are often performed through an HTTP PURGE method, a CDN API call, or a centralized tag-based system that invalidates groups of objects by shared metadata.

Cache invalidation sits at the intersection of performance and data freshness. Without it, a stale cached object can serve outdated content for the duration of its TTL, which may be hours or days in some configurations. Invalidation gives content operators a fast, surgical tool to correct that staleness. Most major CDNs and reverse proxies support some form of invalidation, and in high-traffic systems it is often combined with a cache-busting strategy that uses versioned URLs or fingerprinting to avoid the need for manual purging.

Key facts

  • Removes or marks cached objects so they are re-fetched on the next request.
  • Differs from TTL expiration because it operates on demand, not on a timer.
  • Often implemented via the HTTP PURGE method or CDN API calls.
  • Tag-based invalidation allows purging groups of objects by metadata.
  • Required for fast content corrections without waiting for natural cache expiry.

How it works in practice

A news website publishes an article at the URL /breaking-news with a TTL of 3600 seconds. Two minutes later a factual error is found and corrected on the origin. Without cache invalidation, readers would see the wrong story for the next 58 minutes. An operator sends an HTTP PURGE request for /breaking-news to the CDN edge. The edge removes the cached response. The next visitor triggers a cache miss and receives the corrected article from the origin.

Related terms

Cache Hit Cache Miss Time to Live Cache Busting Content Delivery Network Reverse Proxy

References

More in CDN & Performance

Apdex Score

The Apdex Score is a standardised metric that measures user satisfaction with application performance by comparing response times against predefined target and tolerable thresholds.

Bandwidth Throttling

Bandwidth throttling is the intentional reduction of data transfer speed by a network operator or service provider to manage congestion, enforce usage policies, or control costs.

Brotli Compression

Brotli is a lossless compression algorithm developed by Google, offering higher text compression ratios than gzip, used by CDNs to reduce page load times.

Cache Hit

A cache hit occurs when a requested resource is found in a CDN edge cache and served directly to the client, bypassing the origin server entirely.

Cache Miss

A cache miss occurs when a requested resource is not found in a CDN or proxy cache, forcing the request to be forwarded to the origin server and then storing the response for future requests.

CDN

A CDN (Content Delivery Network) is a geographically distributed network of proxy servers and data centers that deliver web content to users from the nearest edge location, reducing latency and offloading origin servers.

Core Web Vitals

Core Web Vitals are a set of three real-world user experience metrics (LCP, INP, CLS) defined by Google to quantify loading, interactivity, and visual stability on web pages.

Cumulative Layout Shift

Cumulative Layout Shift (CLS) is a Core Web Vital metric that measures the sum of all unexpected layout shift scores during a page's lifespan, quantifying visual stability.

Edge Computing

Edge computing is a distributed computing model that processes data and runs application logic at Points of Presence (PoPs) close to end users, minimizing round-trip latency and bandwidth usage compared to centralized cloud regions.

Image Optimization

Image optimization reduces image file size by selecting modern formats (WebP, AVIF), resizing to display dimensions, and tuning quality, improving page load speed and bandwidth usage.

Who Is Online

In total there are 65 users online: 0 registered, 57 guests and 8 bots.

Most users ever online was 5,555 on 17 Jul 2026, 3:23 am.

Bots: AhrefsBot Applebot Baiduspider Bingbot Other Bot Other Crawler PetalBot SemrushBot

Users active in the past 15 minutes. Total registered members: 369