Interactive Cache Tester

Run live experiments against the CDN. Watch timestamps, poll intervals, and X-Cache indicators to observe caching behaviour in real time.

Step 1 — Confirm App Version

The version endpoint is always no-store, so it always returns the live origin version. Compare this to the version badge shown in cached HTML to spot stale CDN content after a deploy. The response also includes the current process start time so you can confirm the origin restarted.

Expected outcome

  • Cache-Control shows no-store
  • X-Cache stays MISS or absent on every request
  • Via confirms the request passed through Front Door
  • X-App-Version matches the live deployed origin version
  • Started at stays stable between requests until the origin restarts
no-store

GET /api/version

Step 2 — Timestamp Polling

Poll both endpoints every 5 seconds. The live endpoint timestamp should always advance. The cached endpoint timestamp will freeze once the CDN caches the response — that's your cache HIT confirmation.

Expected outcome

  • Live: timestamp changes on every poll and should not become a CDN cache hit
  • Cached: first request is usually MISS, later requests become HIT
  • Age should increase while the cached response stays warm
  • Via and X-App-Version should remain visible inside each card
no-store

/api/info — Live

Not started

s-maxage=60

/api/cached — Cacheable

Not started

Step 3 — Static Asset Cache Test

Click Check Asset Headers to revalidate the original asset URL without changing the CDN cache key. This keeps the test aligned with actual purge behavior for /images/banner.svg while showing the response headers inline.

Expected outcome

  • Cache-Control should include s-maxage=86400
  • The inline header panel shows whether the original asset URL was a HIT or MISS
  • After purge, the first asset fetch should return fresh metadata and reset Age
  • ETag helps confirm the asset instance changed after a deploy

Image Assets

banner /images/banner.svg
card1 /images/card1.svg
card2 /images/card2.svg

Response headers (banner.svg)

Click Check Asset Headers to capture headers.

Step 4 — Purge & Verify

Expected outcome

  • The first request after purge returns X-Cache: MISS
  • Follow-up requests return HIT once Front Door re-caches the object
  • Age resets close to 0 after the purge completes
  • The version badge and static assets reflect the newly deployed content
A

Portal Purge

Azure Portal → Front Door profile → Purge cache → select endpoint → enter paths → Submit.

B

CLI Purge

az afd endpoint purge \
  --resource-group <rg> \
  --profile-name <profile> \
  --endpoint-name <endpoint> \
  --domains <frontdoor-hostname> \
  --content-paths "/*"
C

After Purge — What to Observe

  • First request → X-Cache: MISS (origin fetch)
  • Subsequent requests → X-Cache: HIT (re-cached)
  • New version badge appears in HTML
  • Updated images load
  • Age header resets to 0

Request Log

No requests logged yet.