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
해결되었습니다! 솔루션으로 이동.
토픽은 커뮤니티 콘텐츠를 분류하여 관련성 있는 콘텐츠를 찾는 데 도움이 됩니다.
조회 수
답글
좋아요 수
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.
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.
조회 수
답글
좋아요 수
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.