nswdpc/silverstripe-oldmantium

Reinforced Cloudflare support for Silverstripe websites

Installs: 222

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

Type:silverstripe-vendormodule

v0.1.1 2021-01-25 07:34 UTC

This package is auto-updated.

Last update: 2021-06-16 05:27:46 UTC


README

This module provides some extra sharp additions for Silverstripe using Cloudflare as a frontend

Features

  • 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

Requirements

See composer.json for specifics.

  • Versioned
  • Cloudflare PHP SDK
  • Oldman
  • MultivalueField
  • Queued Jobs

Site publish/unpublish URL purging is undertaken by symbiote/silverstripe-oldman

Installation

composer require nswdpc/silverstripe-oldmantium

License

BSD-3-Clause

See License

Documentation

Configuration

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/'

Versioned DataObject

Give a Versioned DataObject the ability to purge from Cloudfront cache

My\Namespaced\Record:
  extensions:
    - 'NSWDPC\Utilities\Cloudflare\DataObjectPurgeable'

When My\Namespaced\Record is published or unpublished, the corresponding URLCachePurgeJob will be created as a queued job.

Maintainers

Add maintainers here or include authors in composer

Bugtracker

Link to the the issue/bug tracker URL

Development and contribution

If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers.