Reinforced Cloudflare support for Silverstripe websites
This module provides some extra sharp additions for Silverstripe using Cloudflare as a frontend
- Versioned DataObject purging, when that DataObject can be represented by one or more URLs
- Purge hosts, tags, prefixes (for Enterprise Cloudflare accounts)
- Permissions for administration access to purging
- Purge all in zone via a queued job
See composer.json for specifics.
- Cloudflare PHP SDK
- Queued Jobs
Site publish/unpublish URL purging is undertaken by symbiote/silverstripe-oldman
composer require nswdpc/silverstripe-oldmantium
Given a a standard symbiote-oldman configuration:
Symbiote\Cloudflare\Cloudflare: enabled: true email: 'cloudflare@email' auth_key: '<auth_key>' zone_id: '<zone_id>' # Optional, specify a URL to use instead of Director::baseURL() base_url: 'https://www.example.com/'
Give a Versioned
DataObject the ability to purge from Cloudfront cache
My\Namespaced\Record: extensions: - 'NSWDPC\Utilities\Cloudflare\DataObjectPurgeable'
My\Namespaced\Record is published or unpublished, the corresponding URLCachePurgeJob will be created as a queued job.
Add maintainers here or include authors in composer
Link to the the issue/bug tracker URL
If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers.