In Akamai tag purger apply formatting after the tags has been altered by PURGE_CREATION

Created on 23 July 2020, over 4 years ago
Updated 5 December 2023, about 1 year ago

Problem statement

The module adds event subscribers so that other modules can interact with data before sending them to akamai. Module also uses CacheTagFormatter to applying formatting to the cache tags before sending to akamai so that tags can work correctly with akamai.

Both these features are good but there is an inconsistency in AkamaiTagPurger::invalidate() method where it applies formatting first to the cache tags and then dispatch the events for changing them:

This causes following problems:

  1. Event subscribers can be expecting tag in the format of node:1 but instead they will get node_1 and their manipulation could fail.
  2. Event subscribers could add extra tags which will not be in proper format to work with akamai and can cause issues.

Proposed Resolution

Apply the formatting to cache tags after they have been altered with event subscribers.

🐛 Bug report
Status

Needs work

Version

5.0

Component

Code

Created by

🇮🇳India guptahemant

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024