Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

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

Avatar

Adobe Champion

We have the AMS OOB farm file with below dispatcher configuration

 

P_V_Nair_0-1702504923010.png

And our custom project farm file with below configuration

P_V_Nair_1-1702504965999.png

 

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 - 

P_V_Nair_0-1702505322008.png

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

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

View solution in original post

3 Replies

Avatar

Community Advisor

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=...

Avatar

Correct answer by
Community Advisor

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

Avatar

Employee Advisor

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.