nexxai/laravel-cfcache
Laravel integration for Cloudflare's cache API. Automatically purge edge-cached URLs when Eloquent models change, define custom purge rules, and manage zones from Artisan commands—keeping content fresh without manual dashboard work.
php artisan. That turns Cloudflare cache purging into a first-class building block: it can be invoked from model events (content published/updated), queued jobs, admin "purge now" buttons, or scheduled tasks without shelling out via Artisan::call() or wrapping the package in our own adapter.Consider it when:
Look elsewhere when:
Adoption criteria I'd apply: confirm the programmatic API's stability and documented contract (how commands are invoked, what they return, how errors surface), confirm behaviour under queue workers, and check test coverage for the new entry point. Since this is the first release adding a non-CLI invocation path, treat it as new surface area and cover it with our own integration test on the publishing path.
For executives: A small, low-cost dependency just removed the main reason we'd have written cache-purge logic ourselves. The new version lets our application trigger Cloudflare cache clearing directly — when content changes, when a job runs, when an editor clicks a button — instead of relying on deploy scripts or manual console commands. That means fresher content for customers, fewer bespoke scripts to maintain, and less engineering time spent on plumbing. Risk is contained: single-purpose package, incremental feature addition, no breaking changes reported in this release.
For engineering: v1.6.0 exposes the existing command surface for programmatic invocation. Concretely, this lets us call purge logic from listeners, jobs, controllers, and scheduled tasks without Artisan::call() shims or a homegrown wrapper. Recommended next steps: (1) read the PR/README to confirm the invocation signature and error semantics; (2) prototype one real path — e.g. an Eloquent observer on publish that dispatches a queued purge job; (3) add an integration test around that path, since this is newly introduced API surface; (4) evaluate whether this replaces any existing custom purge code, and if so, retire it rather than running both. Flag the single-maintainer risk and pin the version; the payoff is deleting code we'd otherwise own.
How can I help you explore Laravel packages today?