tcb domains cache purge
Purge the CDN or EdgeOne (EO) cache of an HTTP access service domain. The domain must already use CDN or EdgeOne.
Usage
tcb domains cache purge <targets...> -d <domain> [options]
Parameters
| Parameter | Required | Description | Default |
|---|---|---|---|
<targets...> | Yes | Purge targets, at most 20 per call, 2048 characters each | — |
-d, --domain <domain> | Yes | HTTP access service domain | — |
-t, --type <type> | No | Granularity: url / prefix / host; a target ending with / becomes prefix | url |
-c, --cache-type <cacheType> | No | cdn / eo, detected from the domain access type | Detected |
-w, --wait | No | Wait for the purge to finish, useful in CI/CD | false |
-e, --env-id <envId> | No | Environment ID | envId in the configuration |
Granularity:
| Granularity | Description | Scope |
|---|---|---|
url | Exact URL, must carry the http:// or https:// prefix | CDN, EO |
prefix | Directory, must carry the protocol prefix, for example https://example.com/static/ | EO only |
host | Whole domain, bare domain or with protocol | EO only |
Examples
# Purge a single URL
tcb domains cache purge https://example.com/index.html -d example.com -e <envId>
# Purge several URLs
tcb domains cache purge https://example.com/a.js https://example.com/b.css -d example.com -e <envId>
# Directory purge (EO only)
tcb domains cache purge https://example.com/static/ -d example.com -e <envId> -t prefix
# Domain purge (EO only)
tcb domains cache purge https://example.com -d example.com -e <envId> -t host
# Explicit cache type, waiting for completion
tcb domains cache purge https://example.com/index.html -d example.com -e <envId> -c eo --wait
Notes
- The domain must use CDN or EdgeOne before caching applies
- CDN domains only purge by exact URL; directory and domain purges are EdgeOne features
- URL and directory targets need the
http://orhttps://prefix - Cache purge does not support the platform edition (
--platform-id)