Skip to main content
sitewarm
Rank 5 of 10 on caching criteria

KeyCDN CDN caching guide

proinity LLC · reviewed against the vendor documentation listed below

How KeyCDN caches: X-Cache and X-Edge-Location headers, Max Expire and origin headers, zone and URL purges, and Origin Shield with collapsed forwarding.

Part of the Top 10 CDNs in 2026 comparison. New to the topic? Start with why cache warming matters.

Caching at a glance

Cache status on the response
X-Cache (HIT, MISS or STALE) and X-Edge-Location, the edge server that answered (for example nlam).
TTL controls
The zone's Max Expire applies when the origin sends no X-Accel-Expires, Cache-Control or Expires header; Ignore Cache Control makes Max Expire win. The zone's Expire setting affects the browser cache only.
Purge
Purge a whole zone or specific URLs. KeyCDN's API support article also lists a Purge Zone Tag method, but the API reference lists only zone and URL purges (checked 2026-10-18).
Tiering and origin protection
Origin Shield, available to all customers, puts shield servers between the edge and the origin; they use collapsed forwarding and add an X-Shield: active header.
Edge compute
None documented in the pages we reviewed.

Strengths for caching

  • Origin Shield with collapsed forwarding merges concurrent requests for the same URL into one origin request.
  • Serves stale content when the origin is unreachable or times out, and honors stale-while-revalidate (reported as X-Cache: STALE).
  • Pull and push zones.

Watch-outs

  • Tag-based purging is not consistently documented (see Purge above).
  • No soft purge: a zone purge empties the edge, so the next requests go to the origin or the shield.
  • A pull zone serves stale only when the origin is unreachable; if the origin answers 500, 502, 503 or 504, the error is passed on.

Cache warming on KeyCDN

KeyCDN caches per edge location. Without Origin Shield, every edge location fills from the origin; with it, edge misses go to the shield first, and KeyCDN describes edge recovery after a zone purge as smoother. KeyCDN asks you to purge the zone after enabling Origin Shield so that caches refill through the shield.

Confirm warming with X-Cache and X-Edge-Location: the second request to the same edge location should be a HIT. X-Shield: active confirms the request went through the shield.

curl -sI https://example-1a2b.kxcdn.com/ | grep -iE '^(x-cache|x-edge-location|x-shield)'
# x-cache: MISS
# x-edge-location: nlam

If the origin sends no caching headers, Max Expire decides how long the edge keeps a page; set it deliberately, since warming a page with a short TTL only helps until it expires. See the Top 10 CDNs comparison for the scoring.

Frequently asked questions

Does KeyCDN support purging by tag?

KeyCDN's support article on its API lists a Purge Zone Tag method, but the API reference we checked on 2026-10-18 lists only zone and URL purges. Confirm with KeyCDN before you rely on tags.

What does X-Shield: active mean?

The request went through KeyCDN's Origin Shield, the layer between the edge servers and your origin.

KeyCDN documentation

  1. KeyCDN: CDN cache explainedhttps://www.keycdn.com/blog/cdn-cache
  2. KeyCDN: Frequently asked questionshttps://www.keycdn.com/support/frequently-asked-questions
  3. KeyCDN: API referencehttps://www.keycdn.com/api
  4. KeyCDN: Using a CDN APIhttps://www.keycdn.com/support/using-a-cdn-api
  5. KeyCDN: Origin Shieldhttps://www.keycdn.com/support/origin-shield
  6. KeyCDN: Create a pull zonehttps://www.keycdn.com/support/create-a-pull-zone
  7. KeyCDN: Create a push zonehttps://www.keycdn.com/support/create-a-push-zone

Warm your cache after every deploy

sitewarm requests the pages in your sitemap after a deploy and reports the cache state the CDN returns for each one, with the vantage point it was measured from.