Breeze plugin - add feature to purge Cloudflare cache using API
i want so suggest Breeze adds in a setting where you can add your Cloudflare account details so that when you update a plugin, page or post - Breeze will automatically purge it's cache and it will also purge your Cloudflare cache (for users not using the Cloudflare Enterprise add-on through Cloudways).
The reason this should be straight forward is since plugins like WP Rocket, FlyingPress, LiteSpeed Cache, and W3 Total Cache integrate directly with Cloudflare using the Cloudflare API.
Here's what they do under the hood:
You provide:
Your Cloudflare API Token or Global API Key
Your Zone ID
Your Cloudflare account email
When you:
- Update a post/page/product/plugin or clear the plugin cache manually
A cron job is scheduled to clear cache...
They automatically send a POST request to this endpoint: https://api.cloudflare.com/client/v4/zones/YOUR_ZONE_ID/purge_cache
…with a JSON payload like this: { "purge_everything": true }
Result: Cloudflare instantly purges its edge cache, and your site updates are reflected immediately worldwide.