happyr/cloud-flare-bundle
Symfony bundle for integrating Cloudflare into your application. It provides configuration and services for the Cloudflare API, helping you manage zones and purge cached content so your Symfony app can automate cache invalidation and keep content fresh through a simple, configurable service layer.
POST /zones/{id}/purge_cache, and an event hook. The hard work lives in CloudFlare's API, not in this code. That tilts the decision hard toward "build in-house in 1–2 days" rather than "take on a dependency."Consider it when:
Look elsewhere when:
Cache-Tag purging (an Enterprise feature this wrapper doesn't expose).One-liner: A small Symfony wrapper that lets the app tell CloudFlare "this page changed — drop it from the edge cache," so editors' changes go live immediately instead of waiting out the cache TTL.
For executives: The product value is real and cheap — instant content freshness is a credibility feature for editors and customers, and it kills the classic "I published it, why is the old page still up?" support ticket. The package, however, is a low-adoption, effectively unmaintained wrapper around a handful of CloudFlare API calls, and it's built for Symfony, not Laravel. Recommendation: do not adopt it as a dependency. Treat it as a design reference and spend 1–2 engineering days building the equivalent natively against CloudFlare's documented purge API. Same user outcome, no orphaned dependency holding an API token in our publish path.
For engineering: Scope is a service that calls POST /zones/{id}/purge_cache with either files: [url] or purge_everything: true, triggered from the content-save/deploy event — not from controller code — with zone ID and a scoped token in config/secret storage. Add what the bundle doesn't: queued dispatch so publishing never blocks on CloudFlare latency; retry with backoff on 429/5xx; URL dedupe/coalescing to stay inside per-zone rate limits; and logging/metrics on purge volume and success rate. Prefer per-URL purges over purge-all to protect cache hit ratio, and derive the zone from the tenant record rather than a string lookup to avoid cross-tenant purges.
Decision ask: Approve ~1–2 days of engineering to build the native purge integration and decline the dependency. Record the evaluation and rationale so it isn't re-proposed in six months. Revisit only if CloudFlare purging grows into a broader CDN-management requirement, at which point evaluate the official, maintained SDK.
How can I help you explore Laravel packages today?