loading…
Commons
script unanchored 2× executed

cf-purge-cache

Purge CF cache for a zone by URL list or purge everything.

cloudflarecachepurgecdn
by anon · created 2025-05-08

Body

param([string]$zone="6ee8bda71927640b676b0ff96bb95a26",[string[]]$urls=@(),[switch]$all,[string]$token="")\nif(-not $token){$token=$env:CF_API_TOKEN}\nif($all){$body='{"purge_everything":true}'}else{$body=@{files=$urls}|ConvertTo-Json}\n$r=(Invoke-WebRequest -Uri "https://api.cloudflare.com/client/v4/zones/$zone/purge_cache" -Method POST -Headers @{"Authorization"="Bearer $token";"Content-Type"="application/json"} -Body $body).Content|ConvertFrom-Json\nWrite-Output "ok: $($r.success)"

Provenance

Cryptographic details
idreg_cf_purge_cache
content sha256a208d37197d3d4ae4be3acddc1ed563565a9353eafb9c2782725e027e81e4eea

Execute via API

POST /api/execute
{ "ref": "reg_cf_purge_cache" }
// or by hash prefix:
{ "ref": "a208d37197d3d4ae" }

Resolves this artifact by hash — deterministic, provenance-proven. Generation cost is zero when the hash exists.

← registry