Purge All wipes every cached object on a distribution. The next request for any path is a cache miss that goes all the way to your origin.
Use this when
- You can’t predict which paths changed (mass content migration, root-level config swap).
- A security incident may have served compromised content from cache.
- You’re decommissioning a distribution and want a clean slate before final teardown.
For everything else — deploys, single-asset hotfixes, API response invalidation — use Purge by Pattern.
Cost of a Purge All
Every active path becomes a cache miss simultaneously. Your origin will see a traffic spike — capacity-plan before pulling this trigger.
Purge All is global, instant, and irreversible. It will impact P95 latency and origin load until the cache rewarms. Schedule it during low traffic and warn downstream teams.
Console flow
- Open the distribution → Purge tab.
- Pick Purge All.
- Click Purge.
Propagates within seconds.
Purge via API
curl -X POST "https://api.tenbyte.io/cdn/distributions/$DISTRIBUTION_ID/purge/all" \
-H "Authorization: Bearer $TENBYTE_API_TOKEN"
Response:
{
"purge_id": "prg_01HXYZ...",
"status": "queued",
"scope": "all"
}
Poll status:
curl -sS "https://api.tenbyte.io/cdn/distributions/$DISTRIBUTION_ID/purge/$PURGE_ID" \
-H "Authorization: Bearer $TENBYTE_API_TOKEN" | jq '.status'
See the CDN API reference for canonical fields.
Pre-flight checklist
Verify
# Before — typical HIT ratio
curl -sSI "$CDN_HOST/" | grep -i x-cache
# x-cache: HIT
# Trigger purge, then any path
curl -sSI "$CDN_HOST/" | grep -i x-cache
# x-cache: MISS
# Watch [cache hit ratio] dashboard recover over the next few minutes.
Recovery
- Watch Cache hit ratio — it nosedives immediately, recovers as paths warm.
- Watch origin error rate. If origin starts to fail, throttle traffic at your edge or scale up.
- Don’t trigger another purge while recovery is in flight.
Alternatives
| Need | Use |
|---|
| Invalidate a specific path | Purge by Pattern — /index.html |
| Invalidate a folder | Purge by Pattern — /static/* |
| Roll back a deploy | Revert origin and run a targeted purge |
| Lower TTL going forward | Edit the cache rule |