Behind edge ✓host verge.run.placeproto httpscdn-loop vergcloud-staging; count=1
← Feature map

Cache lab

Verify edge HIT/MISS across cache profiles, then purge a stable URL in the panel and confirm a fresh MISS.

Quick setup — Cache lab

Applies Verge config for this lab (cache). Preflight (active domain + reachable CDN) runs first and must pass. Key stays in memory and is proxied server-side.

Example config

  • short-ttl: URL /api/origin/cache/short-ttl*, cache_level query_string, cache_max_age 1m, origin_cache_control on
  • immutable: URL /assets/immutable/*, cache_level uri, cache_max_age 30d, cache_args off
  • no-store: URL /api/origin/cache/no-store*, cache_level off
  • purgeable: URL /api/origin/cache/purgeable*, cache_level uri, cache_max_age 1h

Setup guide

CDN → Domain [domain] → Page Rule / Cache → Purge

Suggested config

  • short-ttl: URL /api/origin/cache/short-ttl*, cache_level query_string, cache_max_age 1m, origin_cache_control on
  • immutable: URL /assets/immutable/*, cache_level uri, cache_max_age 30d, cache_args off
  • no-store: URL /api/origin/cache/no-store*, cache_level off
  • purgeable: URL /api/origin/cache/purgeable*, cache_level uri, cache_max_age 1h

Verify

  1. Request twice with the same URL (no cache-buster) — expect MISS then HIT
  2. Check age + timing drop on the second request
  3. immutable: probe /assets/immutable/app.v1.js — Cache-Control immutable + edge HIT
  4. no-store should never HIT
  5. Purge: warm purgeable → HIT, purge that URL in panel → next fetch MISS / new nonce

Origin routes

All probes are same-origin through the CDN hostname. Open routes in a new tab to compare edge vs origin headers.

/api/origin/cache/short-ttl
No request yet — hit a button above to run a probe.

Purge checklist

  1. Warm cache: request twice on /api/origin/cache/purgeable — expect MISS then HIT (same nonce).
  2. In the panel: Cache → Purge (or page-rule purge) that exact URL on the CDN hostname.
  3. Request once more here — expect MISS / new nonce (body issuedAt changes).
No request yet — hit a button above to run a probe.