Portal / Nodes / Cloudflare / cache/purgeAll
cache/purgeAll
Purge all cached assets for a Cloudflare zone. All subsequent requests will hit the origin until the cache warms back up.
Full origin load spike: This operation instantly invalidates all cached content for the zone. Every request from every user will hit your origin server until the cache is rebuilt. For high-traffic zones, this can significantly increase origin server load. Use
cache/purgeByUrl or
cache/purgeByTag for targeted invalidation when possible.
Equivalent operation: This operation is functionally identical to
zone/purgeAll. Both purge all cached assets for the zone. This version is provided under the cache resource for workflow organization convenience.
When to Use
- Emergency stale content purge: When security-sensitive or incorrect content has been cached and is being served to users, a full purge is the fastest remediation.
- Full-site deployment refresh: After a major release that changes layouts, styles, and content across the entire site, purge all cache to guarantee users see the new version immediately.
- Post-migration state reset: After migrating origin infrastructure (servers, CDN config, WAF rules), purge all cache to establish a fresh baseline.
- WAF rule change: After adding or modifying WAF rules that may affect cached content decisions, clear cache to ensure the new rules apply to all served content.
Configuration
Connection
| Field | Type | Required | Description |
ApiToken | string | required | Scoped Cloudflare API Token with Cache Purge permission. Store in BizFirst Credentials Manager. |
Operation Fields
| Field | Type | Required | Description |
ZoneId | string | required | 32-character hexadecimal Zone ID. Identifies which zone's entire cache to purge. |
Sample Configuration
{
"resource": "cache",
"operation": "purgeAll",
"connection": {
"ApiToken": "{{ $credentials.cloudflare_cache_purge }}"
},
"ZoneId": "023e105f4ecef8ad9ca31a8372d0c353"
}
Validation Errors
| Code | Condition | Resolution |
MISSING_API_TOKEN | ApiToken is empty | Set the ApiToken credential with Cache Purge permission |
MISSING_ZONE_ID | ZoneId is empty | Provide the Zone ID |
UNKNOWN_ERROR | Cloudflare returned an error | Verify the token has Cache Purge scope for this zone |
Output
Success Port
| Field | Type | Description |
id | string | Purge job ID assigned by Cloudflare — log for audit trail |
status | string | ok when the purge request was accepted |
Error Port
On failure, the error port receives an object with code and message.
Sample Output
{
"id": "9a7806061c88ada191ed06f989cc3dac",
"status": "ok"
}
Expression Reference
| Expression | Returns |
{{ $node.CachePurgeAll.output.id }} | Purge job ID for audit log |
{{ $node.CachePurgeAll.output.status }} | "ok" on success |
Node Policies & GuardRails
| Policy | Detail |
| Prefer targeted purge operations | Use cache/purgeByUrl or cache/purgeByTag whenever the scope of change is known — reserve purgeAll for genuine full-site scenarios |
| Verify Zone ID before execution | A wrong Zone ID purges the wrong domain's entire cache — use zone/list upstream if the ID is not hard-coded |
| Monitor origin capacity before purging | On high-traffic sites, a full purge during peak hours can overload the origin — schedule purges during low-traffic windows |
| Use Cache Purge scoped token | Token needs only Cache Purge permission |
| Log the purge job ID | Store the returned id in an audit log with timestamp, initiating workflow, and reason for the purge |
Examples
Example 1: Emergency Incident Response Purge
An ops webhook fires when a P1 incident is declared involving stale or corrupted cached content. The workflow: (1) Validates the Zone ID from the incident payload. (2) Calls cache/purgeAll. (3) Logs the purge job ID and timestamp to the incident record in PagerDuty. (4) Sends a Slack notification to the #incidents channel confirming the cache was purged.
Example 2: Post-Full-Deployment Cache Reset
After a major release: all services are deployed, health checks pass, and smoke tests succeed. The final step in the workflow calls cache/purgeAll to clear the CDN cache and allow the new release to be served to all users. The purge job ID is written to the deployment log.
Example 3: Scheduled Dev/Staging Cache Reset
A ScheduledTrigger runs at 07:00 every weekday for the staging zone. It calls cache/purgeAll to ensure developers and QA engineers start each day with fresh content from the origin. The operation is scoped only to the staging zone ID — production is never touched.