netnak / cloudburst
Requires
- statamic/cms: ^4.0 || ^5.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Cloudburst is a Statamic addon that integrates with Cloudflare to let you easily purge cache directly from your control panel.
🚀 Features
- One-click Cloudflare cache purge from Statamic CP
- Purge a single asset's file from the cache directly from the Assets browser
- Automatically detects and stores your Cloudflare Zone ID
- Dashboard widget for quick access
- Configurable via
.envor config file - allows multi domain cache busting
📦 Installation
Install via Composer:
composer require netnak/cloudburst
Then publish the config file (optional):
php artisan vendor:publish --tag=cloudburst-config --force
⚙️ Configuration
Cloudburst auto-registers itself as a widget
To manually turn it off you can use the setting in the config
'show_widget' => false
✅ Usage
This addon requires a CloudFlare API token. It will need read access to the cloudflare API zone resources and purge access to cache purge.
These env variables override defaults in config/cloudburst.php:
CLOUDBURST_ACCESS_KEY=your_cloudflare_access_key CLOUDBURST_OVERRIDE_DOMAIN=yourdomain.com # optional override or CSV yourdomain.com,yourotherdomain.com
Or edit config/cloudburst.php directly.
Purging a single asset
Once connected, you can also purge one file at a time without flushing the whole zone:
- Open the Assets browser in the CP.
- Select one asset (or select several for a bulk purge).
- Open the action menu (⋯) and choose Purge from Cloudflare.
This purges just that asset's URL(s) from the Cloudflare cache — handy after replacing an image or document.
🪪 License
MIT — see the LICENSE file for details.