Rust

cloudflare

Module

Cloudflare's purge API.

Contents

use utopia_cdn::cache::cloudflare::Cloudflare;
Rust
pub struct Cloudflare<C = DefaultClient>

Purges a Cloudflare zone through its purge_cache endpoint: URLs, hostnames, cache tags, or everything.

Rust
use utopia_cdn::cache::{Adapter, Cloudflare};

let cloudflare = Cloudflare::new("zone-id", "api-token");
cloudflare.purge_keys(&["product-42".into()]).await?;
Compiles in CI; needs a running service to execute.