Cloudflare

Purge Cloudflare caches from Craft.

free

1.1.0

April 23, 2022
changed
  • Automatic element-save cache purges are now sent to the queue to speed up element saves.

  • Cleaned up translation files and added new keys to German set.

fixed
  • Draft entry and category saves are ignored and will not trigger a cache purge.

1.0.3.1

January 31, 2022
fixed
  • Fixed a bug where only the zone cache purge would log a 200-status failure response. (Now applies to all other API requests.)

1.0.3

January 29, 2022
fixed
  • Unsuccessful, 200-status API responses will log returned messages instead of throwing exceptions. (#44)

1.0.2

October 2, 2021
changed
  • Minor front-end dependency security updates.

removed
  • Removed explicit Composer PHP requirement.

1.0.1

February 2, 2021
changed
  • Moved cache file to Craft’s storage directory rather than its default vendor/ location. (#31)

1.0.0

January 31, 2021
added
  • Added a Cloudflare utility for purging URLs and managing rule-based purging options.

changed
  • Craft 3.6.0 or higher is required.

  • Moved formerly-hidden purge rules to the Cloudflare utility. (#26)

  • Moved URL purge tools from settings to the Cloudflare utility.

fixed
  • Added support for multi-level domain suffixes. (#22)

removed
  • Removed static $plugin variable. Replace instances of Cloudflare::$plugin with Cloudflare::getInstance().

0.6.0

October 24, 2020
fixed
  • Fixed PSR-4 namespacing for Composer 2.

0.5.1

April 26, 2020
fixed
  • Fresh plugin installs no longer prevent saving key-based settings. (Fixes #19.)

0.5.0

April 5, 2020
added
  • Expanded automatic element URL purge options to include categories, tags, and Commerce variants and products. (#16)

fixed
  • Improved zone selection for API tokens that can’t list zones. (#17)

changed
  • Moved documentation to its own site.

0.4.1

February 11, 2020
added
  • The zone setting will now be parsed for environment variables.

changed
  • All control panel interactions are now asynchronous.

  • The dashboard widget and settings page will both ask for confirmation before purging the entire zone.

  • Updated the readme.

fixed
  • It’s now possible to set the Cloudflare zone ID from a static config file.

  • Purge attempts from the control panel now correctly report success or failure and log details to the browser console.

0.4.0

December 26, 2019
fixed
  • Settings no longer throw an exception if saved with an invalid API Key.

  • Fixed missing credentials alert in Settings when verifying an API Token without key settings present.

  • Optimized and refactored code.

  • Improved Settings validation.

  • Fixed widget icon.

changed
  • The cloudflare service is now api.

  • Stale settings for an unused auth type will be removed rather than stored.

0.3.0

December 26, 2019
added
  • Added support for API Tokens.

0.2.9

March 23, 2019
added
  • Added craft cloudflare/purge/purge-all and craft cloudflare/purge/purge-urls console commands for clearing zone and individual URL caches.

changed
  • Can now auto-purge zone subdomain URLs, useful for CDN-hosted Assets.

fixed
  • Fixed trivial yet unsightly padding issue resulting from a Craft CSS update.

0.2.8

March 2, 2019
fixed
  • Fixed Craft < 3.1 compatibility for API Key setting.

0.2.7

February 26, 2019
added
  • Environment variables can now be used for the control panel's API Key setting.

0.2.6

January 5, 2019
fixed
  • Fixed console exception thrown checking for post params when they don't exist.

0.2.5

January 5, 2019
fixed
  • Removed perilous trailing comma from CloudflareService. (Thanks @jkorff!)

0.2.4

January 5, 2019
fixed
  • Settings "Verify Credentials" AJAX works again after bug introduced in 0.2.2 (#10).

  • Restored proper logging (#10).

  • Made various code improvements to benefit readability and sanity.

changed
  • Slightly changed CloudflareService API to improve clarity and efficiency. **If you had custom code interacting with the apiBaseUrl, client, or isConfigured properties, please use getApiBaseUrl(), getClient(), and isConfigured() respectively.

  • After initial setup (or re-saving Settings), only URLs in the selected zone name (domain) will be purged. This will prevent API calls in environments with base URLs that aren't on the Cloudflare zone.

  • Updated Composer requirements to include PHP 7 and the JSON extension.

0.2.3

November 2, 2018
fixed
  • Fixed missed purges due to doubled-up element site URLs (https://foo.com/https://foo.com/element).

0.2.2

October 26, 2018
fixed
  • Prevented plugin from interfering with console commands.

improved
  • Configuration options can now display more than 20 zones.

0.2.1

September 20, 2018
fixed
  • Missing API credentials won't affect element save/delete actions.

0.2.0

May 8, 2018
added
  • Craft 3 version initial release. Many thanks to Mo, all mistakes mine.

0.1.4

September 27, 2017
improved
  • Reduce API calls before credentials are added.

0.1.3

September 26, 2017
added
  • Exposed automatic Asset and Entry URL purge in settings.

improved
  • Improved log messages for failed URL purges."

0.1.2

September 14, 2017
added
  • Added dashboard quick purge widget.

0.1.1

August 16, 2017
fixed
  • Added proper support custom CP + action URLs.

0.1.0

August 15, 2017
added
  • Initial release.

Other Plugins