Reputation: 1069
AEM docs says
When a parameter is ignored for a page, the page is cached the first time that the page is requested. Subsequent requests for the page are served the cached page, regardless of the value of the parameter in the request.
/ignoreUrlParams
{
/0001 { /glob "*" /type "deny" }
/0002 { /glob "q" /type "allow" }
}
if I add above entry in dispatcher configuration
GET /mypage.html?q=5
GET /mypage.html?q=65
gives same response as per documentation? If yes what is the benefit of /ignoreUrlParams and which scenario it will be useful?
Upvotes: 0
Views: 647
Reputation: 1674
This is because the default configuration from the docs is misleading and is actually the other way round :/
If you want the CACHE feature to ignore some Query param then you set it to "allow". If you want the CACHE feature to pass a request with a specific query to CQ you put "deny"
So if you have a search functionality using the q
parameter then you should do:
/ignoreUrlParams
{
/0001 { /glob "*" /type "allow" }
/0002 { /glob "q" /type "deny" }
}
Upvotes: 1