Set up push invalidation for Akamai

Push invalidation is enabled by adding the Akamai Fast Purge purge credentials to the CDN section of the configuration service.

curl --request POST \
  --url https://admin.hlx.page/config/{org}/sites/{site}/cdn.json \
  --header 'content-type: application/json' \
  --data '{
 "prod": {
  "host": "{production host}",
  "type": "akamai",
  "endpoint": "{akamai host}",
  "clientSecret": "{client_secret}",
  "clientToken": "{client_token}",
  "accessToken": "{access_token}"
 }
}'

Configuration properties:

Property Value Description
host <Production Host> Host name of the production site, e.g. www.yourdomain.com
type akamai
endpoint <host> Fast Purge API host, ***.purge.akamaiapis.net.
clientSecret <client_secret> Fast Purge API client secret. Supports secret references.
clientToken <client_token> Fast Purge API client token. Supports secret references.
accessToken <access_token> Fast Purge API access token. Supports secret references.

Create the Akamai Fast Purge credentials

AEM push invalidation uses the Akamai Fast Purge API, specifically Delete by URL and Delete by cache tag.

The Fast Purge API credentials consist of

host = akaa-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.luna.akamaiapis.net
client_token = akab-XXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXX
client_secret = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
access_token = akab-XXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXX

They can be generated by following the instructions at Create an API client with custom permissions.

Go to Identity & Access Management:

Create API client:



Required group/role permissions:

Validate the credentials

You can validate the credentials with this tool.

Notes

Akamai Edge-Control headers: AEM uses a fine tuned, production hardened way to supply caching information that applies to the specific CDN, in conjunction with our reliable push invalidation. This allows us to improve cache efficiency and consistency over traditional TTL based approaches.

Every CDN vendor supports a way to directly influence how to instruct caching and we are excited to see standardization efforts like "Targeted Cache Control" (TCC) being on the roadmap for Akamai (see: https://www.akamai.com/blog/news/targeted-cache-control), in the meantime we are using Akamai's long-term supported Edge-Control header.