Add support for 'everything' invalidations

Created on 31 May 2023, about 1 year ago
Updated 12 July 2023, 12 months ago

Problem/Motivation

Developers need a way to trigger a cache purge of all pages on their site from the Akamai CDN.

Proposed resolution

The purge module offers an 'everything' invalidation type that can be used to request that all cached content be invalidated.

However, it is up to the purger plugin to handle this invalidation properly as the implementation for purging all content is dependent on the CDN.

I've extended the Akamai bundled tags purger to declare support for 'everything' invalidations.

Unfortunately, Akamai's CCU v3 API that we're currently using does not support wildcard invalidations, so we can't tell it to clear a route such as /* or use a regular expression to match all cache tags. Instead, upon receiving a request to purge all content, the plugin generates a request to flush the 'http_response' cache tag, which is present on all routes served by Drupal ( https://www.drupal.org/node/2847072 β†’ ).

With this change, all content can be invalidated from the CDN by running `drush cache-rebuild-external -y`.

Remaining tasks

  • Review and testing.
✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024