When setting up purge I want the ability to enable and disable different invalidation types for specific purger plugins. Ideally I could click on the checkmarks to enable or disable the invalidation type here: /admin/config/development/performance/purge

The use case came up in CloudFlare. A user wanted the ability to disable tag based purging for cloudflare and purge by path due to API rate limiting. While they could disable the tag-queuer if they wanted to use tag based invalidation for varnish they would be out of luck. A patch was submitted to fix the issue on cloudflare however it seems like the enhancement belongs here instead so that it's universally applicable.

See original feature request here:
https://www.drupal.org/node/2820101

Issue fork purge-2823591

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

adam.weingarten created an issue. See original summary.

adam.weingarten’s picture

nielsvm’s picture

Yes, I agree, this is needed and UX-wise clicking the checkmark is the right approach (alongside with a one-line tip hint). I do want to postpone this feature after the beta's as touching the CMI parts is a little too risky for me at this point.

Great thinking Adam,

Niels

japerry made their first commit to this issue’s fork.

japerry’s picture

Status: Active » Needs review

Here is a POC MR...
How it works:
1. On the dashboard (/admin/config/development/performance/purge), clicking a checkmark opens a confirmation dialog to toggle that type
2. A "Types" link in each purger's operations dropdown opens a form with checkboxes for all supported types
3. Disabled types are stored in purge.plugins config and filtered from getTypesByPurger()
4. When processing invalidations, disabled types get NOT_SUPPORTED state for that purger