Advertising sustains the DA. Ads are hidden for members. Join today

On this page

Cache Tag Purging

Last updated on
19 October 2021

This module provides a Drupal 8 service to interact with the Akamai Content Control Utility.

While the service can be used by developers in isolation, most users should install the Purge module. Purge will take care of invalidating caches automatically when content is updated.

Cache Tag Blacklist

Numerous cache tags are attached to any given page and queued for expiration when changes are made to that page.

Below is a cache tag blacklist to get started to limit Akamai purge requests to node changes.

4xx-response
theme_registry
route_match
routes
config:
node_list
user
migration_
local_
entity_
workflow_
element_
contextual_links_
link_relation_
content_moderation_
webform_submission_list
redirect_list

Setup

  1. Setup Akamai (See Getting Started)
  2. Install Purge module
  3. Visit Configuration > Akamai > Akamai Settings
  4. Enable Edge-Cache-Tag Header and Akamai Logging, and add cache tag blacklist for filtering tags output in the HTTP page response header

    Note: This list will limit the cache tags output in the HTTP response header. This is helpful to limit tags that could lead to unexpected invalidations or result in Akamai API failures due to header response size (limit is 8192 bytes).
     
  5. Install Purge module
  6. Enable Purge, Purge UILate runtime processor, and Core tags queuer modules
  7. Visit Configuration > Development > Performance > Purge
  8. Click Add purger
  9. Select Akamai Tag Purger and click Add
  10. Under Queue click Core tags queuer  > Configure
  11. Add the cache tag blacklist from above to limit the cache tags that will be queued to purge automatically and send CCU API requests to Akamai

Verification

  1. Visit any given node and verify the Edge-Cache-Tag HTTP Response Header is present
  2. Make an update to any given node
  3. Verify node-specific cache tag(s) are sent to CCU API to purge

Help improve this page

Page status: No known problems

You can: