Cache purge

Remove a cached response when published content changes. Select the narrowest purge scope that covers the update and verify the next fetch against the origin.

Purge a single cached file
Select a step in the cache lifecycle

Version 1 cachedThe origin has a new catalogue. A fresh cached copy can still serve version 1 to visitors.

Invalidate an object before it expires

Cloud CDN supports purge by URL, file or directory, plus prefetch. Use long TTLs on hashed assets and purge HTML or media when the source changes.

Purge by URL, file or directory

Invalidate exactly the path that changed instead of dropping the whole cache.

Prefetch before the spike

Warm heroes, depots or HTML before a launch so the first users do not all miss.

Keep unaffected entries cached

A targeted purge leaves other cached objects available to answer requests.

Configuration

Cloud CDN overview
  1. Separate hashed and unhashed paths

    Hashed files rarely need purge. HTML and latest pointers do.

  2. Hook purge to deploy and publish

    CI and CMS webhooks should call purge for the URLs they change.

  3. Prefetch launch assets

    Before a campaign or release, prefetch the objects you know will be hot.

  4. Confirm with logs

    Watch hit ratio and origin traffic after purge to ensure the new object is served.

Operational outcomes

  • HTML can go live without waiting on TTL
  • Hashed assets keep long TTLs
  • Launch files can be warmed in advance
  • A purge can invalidate a path before its normal expiry

Frequently asked questions

Can I purge the entire distribution?

Prefer URL or directory purge. Broad invalidation is a last resort because it creates an origin spike.

How fast is purge?

Purge is an operational control on the distribution. Validate timing on a test path before you depend on it for a launch.

Does purge work with image variants?

Purge the source URL so derived variants rebuild on the next request.

Should I purge after every CMS save?

Purge the URLs that changed. Saving a draft should not invalidate the public page.