Purge by Pattern invalidates a precise set of cached objects without dumping the whole cache. This is the right tool for deploys, content fixes, and incident response.Documentation Index
Fetch the complete documentation index at: https://docs.tenbyte.io/llms.txt
Use this file to discover all available pages before exploring further.
When to use this
- After a deploy that changes specific paths (
/static/main.js,/api/v1/*). - After fixing a content bug that’s already cached.
- When TTL is too long for the asset you just updated.
How patterns work
The first request after a purge is aMISS. Plan your purge timing so the resulting origin spike is acceptable.
Pattern rules
- Must start with
/. *is a wildcard matching one or more characters.- Up to 10 patterns per purge request.
| Pattern | Matches |
|---|---|
/index.html | Single object. |
/images/* | Everything under /images/. |
/static/css/* | All CSS files. |
/api/v1/* | All v1 API responses. |
/photos/hero.* | All formats / sizes of hero (after image optimizer). |
Console flow

- Enter one pattern per line in the input box.
- Click Purge to dispatch.

Purge via API
CI/CD integration
GitHub Actions
Shell helper
Verify the purge
Operational tips
- Purge before flipping traffic. For blue/green deploys, purge the green hostname after the new build is live, not before.
- Use exact paths over wildcards.
/static/main.abc123.jsinvalidates one object;/static/*invalidates everything and risks an origin spike. - Avoid frequent global purges. Each purge is a coordinated edge-wide operation. Hashed asset URLs make most purges unnecessary.
- Monitor origin after a wide purge. Watch Cache hit ratio — it dips immediately, then recovers as the cache rewarms.
Limits and quotas
- Up to 10 patterns per request.
- Purges are async;
completedstatus typically lands within seconds, sometimes up to a minute under heavy load. - Bulk purges (>1000/day) should batch and back off on
429.
Troubleshooting
| Symptom | Fix |
|---|---|
Pattern rejected — must start with / | Add the leading slash. |
x-cache: HIT immediately after purge | Edge briefly returned a stale node. Try one more request — global propagation isn’t instant. |
| Wildcards seem to ignore deeper paths | * doesn’t cross domains; double-check the pattern starts where you expect. |
| Origin spike after purge | Wildcard too broad. Combine with rate limits at the origin or refine the pattern. |