How to allow a query parameter to be cached at Akamai in dispatcher configuration | Community
Skip to main content
Adobe Champion
December 13, 2023
Solved

How to allow a query parameter to be cached at Akamai in dispatcher configuration

  • December 13, 2023
  • 3 replies
  • 1957 views

We have the AMS OOB farm file with below dispatcher configuration

 

And our custom project farm file with below configuration

 

It is commented and not used.

 

I have a requirement to ignore "imWidth" query parameter from the url's , so that images are cached at Akamai and not hitting dispatcher. Currently, i can see from logs, these requests are hitting dispatcher and publisher, though it is expected to serve from Akamai

e.g url - 

In this case, what is the rule is need to add in my custom farm file overriding '/ignoreUrlParams'

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

Hi @p_v_nair 
You need to update rules in your project farm as you mentioned:

 

/0001 { /glob "*" /type "deny" } /0002 { /glob "imWidth" /type "allow" }

 

At Akamai - if your cache key is uri then for every unique request there will be a separated cache key. If this works for you then you don't need to anything but if you think there can be many unique request due to  "imWidth" then you need to ask Akamai to update the cache key rule to remove query parameters.

3 replies

DPrakashRaj
Community Advisor
Community Advisor
December 13, 2023

Dispatcher configs can only control the caching on dispatcher. It won’t force the Akamai to cache. You need to setup the rule for caching query parameters images on Akamai with Akamai configs changes and not on dispatcher.

to cache the query parameters request on aem dispatcher please visit https://docs.mktossl.com/docs/experience-manager-learn/ams/dispatcher/understanding-cache.html?lang=en

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
December 14, 2023

Hi @p_v_nair 
You need to update rules in your project farm as you mentioned:

 

/0001 { /glob "*" /type "deny" } /0002 { /glob "imWidth" /type "allow" }

 

At Akamai - if your cache key is uri then for every unique request there will be a separated cache key. If this works for you then you don't need to anything but if you think there can be many unique request due to  "imWidth" then you need to ask Akamai to update the cache key rule to remove query parameters.

Arun Patidar
joerghoh
Adobe Employee
Adobe Employee
December 22, 2023

If you want to handle these requests on Akamai, you need to instruct Akamai to do so; when you use the /ignoreUrlParams setting on the dispatcher, it only applies to the dispatcher, and Akami (if not instructed to do otherwise) will consider these requests still as un-cacheable.