Payload Purge Cache Plugin v0.1.1
Granular Cloudflare purge support and runtime purger control now available in v0.1.1.
Payload Purge Cache Plugin v0.1.1 introduces more detailed configuration for the Cloudflare purger and lets you skip specific purgers when needed.
New Features
Granular Cloudflare Purger Config
On April 1st, Cloudflare announced that all purge methods are now available for every plan. Just a few days later, the initial version of the Purge Cache Plugin was released. Starting with version v0.1.1, you can now specify which hosts, tags, prefixes, and full URLs to purge.
# typescript
getCloudflarePurgerAction({
apiKey: '...',
zoneId: '...',
hosts: ['notesofdev.com'],
})
You can set multiple options at once. For example, if you define a host, tags, and a prefix, the plugin will purge all three individually.
Here are the new options you can use in the purger config:
hosts?: string[]
- Optional list of hosts to purgetags?: string[]
- Optional list of tags to purgeprefixes?: string[]
- Optional list of prefixes to purge. A prefix has to include hostname but not scheme (e.g.:example.com/prefix
)files?: string[]
- Optional list of specific urls to purge. An url has to include scheme, hostname and path (e.g.:https://example.com/full/path
)
Skip Specific Purgers
Sometimes, you may want to purge just one part of the cache. For example, if you have a purger that handles all links starting with /blog
, you can now run only that purger and skip the rest:

Bug Fixes and Maintenance
This version also includes three minor fixes:
- Added error message for invalid Cloudflare config - previously, if the Cloudflare configuration was incorrect, no error was shown, leaving the user with stale cache.
- Removed default error type in PurgerAction - the error type is already inherited from the Purger config. Keeping a default caused false-positive type errors.
- Added missing styles - Minor visual updates.