PHPackages                             pantheon-quicksilver/cloudflare-cache - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. pantheon-quicksilver/cloudflare-cache

ActiveQuicksilver-script[Caching](/categories/caching)

pantheon-quicksilver/cloudflare-cache
=====================================

Composer-installable script to purge Cloudflare cache when your live environment's cache is cleared

v1.0.0(4y ago)02MITPHP

Since Oct 27Pushed 4y ago1 watchersCompare

[ Source](https://github.com/pantheon-quicksilver/cloudflare-cache)[ Packagist](https://packagist.org/packages/pantheon-quicksilver/cloudflare-cache)[ Docs](https://github.com/pantheon-quicksilver/cloudflare-cache)[ RSS](/packages/pantheon-quicksilver-cloudflare-cache/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

Cloudflare Cache
================

[](#cloudflare-cache)

This composer-installable example demonstrates how to purge Cloudflare cache when your live environment's cache is cleared.

TODO
----

[](#todo)

- Quicksilver script projects and the script name itself should be consistent in naming convention. - To rename after demonstrated working with existing filenames (underscores)

### Installation

[](#installation)

While it's possible to use the script individually, this project is designed to be included from a site's `composer.json` file, and placed in its appropriate installation directory by [Composer Installers](https://github.com/composer/installers).

In order for this to work, you should have the following in your composer.json file:

```
{
  "require": {
    "composer/installers": "^1"
  },
  "extra": {
    "installer-paths": {
      "web/private/scripts/quicksilver": ["type:quicksilver-script"]
    }
  }
}
```

The project can be included by using the command, where `{quicksilver-project}` represents the name of the Quicksilver script:

`composer require pantheon-quicksilver/{quicksilver-project}:^1`

If you are using one of the example PR workflow projects ([Drupal 8](https://www.github.com/pantheon-systems/example-drops-8-composer), [Drupal 9](https://www.github.com/pantheon-systems/drupal-project), [WordPress](https://www.github.com/pantheon-systems/example-wordpress-composer)) as a starting point for your site, these entries should already be present in your `composer.json`.

Setup
-----

[](#setup)

- Copy `cloudflare-cache.json` to `files/private` of the *live* environment after updating it with your cloudflare info.
- API key can be found in the `My Settings` page on the Cloudflare site.
- I couldn't find zone id in the UI. I viewed page source on the overview page and found it printed in JavaScript.
- Add the example `cloudflare-cache.php` script to the `private/scripts` directory of your code repository.
- Add a Quicksilver operation to your `pantheon.yml` to fire the script after a deploy.
- Deploy through to the live environment and clear the cache!

Optionally, you may want to use the `terminus workflows watch` command to get immediate debugging feedback.

### Example `pantheon.yml`

[](#example-pantheonyml)

Here's an example of what your `pantheon.yml` would look like if this were the only Quicksilver operation you wanted to use.

```
api_version: 1

workflows:
  clear_cache:
    after:
      - type: webphp
        description: Cloudflare Cache
        script: private/scripts/cloudflare-cache.php
```

Note that you will almost always want to clear your CDN cache with the *after* timing option. Otherwise you could end up with requests re-caching stale content. Caches should generally be cleared "bottom up".

###  Health Score

22

—

LowBetter than 23% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1653d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e1afabee581deb6161002f5f479e52610b94e544938f335b1dd6f2dd6e40d678?d=identicon)[namespacebrian](/maintainers/namespacebrian)

---

Top Contributors

[![namespacebrian](https://avatars.githubusercontent.com/u/87093053?v=4)](https://github.com/namespacebrian "namespacebrian (8 commits)")[![kyletaylored](https://avatars.githubusercontent.com/u/1759794?v=4)](https://github.com/kyletaylored "kyletaylored (1 commits)")

### Embed Badge

![Health badge](/badges/pantheon-quicksilver-cloudflare-cache/health.svg)

```
[![Health](https://phpackages.com/badges/pantheon-quicksilver-cloudflare-cache/health.svg)](https://phpackages.com/packages/pantheon-quicksilver-cloudflare-cache)
```

###  Alternatives

[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[rtcamp/nginx-helper

Cleans nginx's fastcgi/proxy cache or redis-cache whenever a post is edited/published. Also provides cloudflare edge cache purging with Cache-Tags.

23817.0k1](/packages/rtcamp-nginx-helper)[humanmade/batcache

A memcached HTML page cache for WordPress.

16447.7k3](/packages/humanmade-batcache)[voceconnect/wp-large-options

You may wish to store a larger option value than is recommended on WordPress.com. If your option data will exceed 400K, or is of an unpredictable size (such as an HTML fragment etc.) you should use the wp\_large\_options plugin to store the option in a cache-safe manner. Failure to do this could result in the option not being cached, and instead fetched repeatedly from the DB, which could cause performance problems.

355.1k](/packages/voceconnect-wp-large-options)[offline/oc-speedy-plugin

Speed up your October CMS installation

181.0k](/packages/offline-oc-speedy-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
