Hi,
I am a newbie to AEM and was trying to understand ignoreurlparams which is very confusing.
Could you help me with which urls would be cached and does order also has significance?
/ignoreUrlParams
{
/001 { /glob "*" /type "deny" }
/002 { /glob "param1" /type "allow" }
/003 { /glob "param2" /type "allow" }
}
URL 1: /mysite/mytest.htmI?param2=a
URL 2: /mysite/mytest.htmI?param1=s¶m2=a¶m3=h
URL 3: /mysite/mytest.htmI?param10=local
URL 4: /mysite/mytest.htmI?param1=s
URL 5: /mysite/mytest.htmI?param2=a¶m1=s
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi @Sahasra_M
If there are query parameters which are needed by the server side code, then they should explicitly be "denied" from being ignored. For example, consider a search term query param which is used by a server side search method. When a request for en.html?search=cycling is received, it should be handled by the publish tier and always count as a cache miss.
So you should allow caching of all content and deny only specific where you want the request to be a cache miss.
/ignoreUrlParams {
/0001 { /glob "*" /type "allow" }
/0002 { /glob "q" /type "deny" }
/0003 { /glob "anythingelse" /type "deny" }
}
Please refer the link here:
https://github.com/adobe/aem-dispatcher-optimizer-tool/blob/main/docs/Rules.md#dot---the-dispatcher-...
Thanks,
Asutosh
Thank you for help.
So out of the 5 urls, URL1, URL4, URL 5 would be cached. While URL3 would be handled by publish tier since param3 is ignored. But, would URL2 be also cached which is having two parameters as allowed and one being ignored? Let me know if my understanding is correct.
Views
Replies
Total Likes
Hi @Sahasra_M
URL 2 will not be cached as it has one parameter which is not in the allowed list.
The approach you are following, is not compliant as any additional parameter in the request such as &abc, &xyz and so on... will prevent caching of the request in dispatcher and will always be a cache miss.
So you should use the allow pattern so all request will be cached with query parameters and deny only specific - for those only you want the request not to be cached.
https://github.com/adobe/aem-dispatcher-optimizer-tool/blob/main/docs/Rules.md#dot---the-dispatcher-...
The above links has the complete details. Let me know if you have any questions.
Views
Replies
Total Likes
I understood it. Thanks a lot for your help.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Like
Replies