AEM文档称
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" }
}
如果我在dispatcher配置中添加上述条目
GET /mypage.html?q=5
GET /mypage.html?q=65
是否给出与文档相同的响应?如果是,/ignoreUrlParams的好处是什么?它将在哪种情况下有用?
发布于 2016-11-23 12:35:30
这是因为文档中的默认配置具有误导性,实际上正好相反:/
如果你想让缓存功能忽略一些查询参数,那么你可以将其设置为"allow“。如果您希望缓存功能将带有特定查询的请求传递给CQ,您可以输入"deny“
因此,如果您有一个使用q
参数的搜索功能,那么您应该这样做:
/ignoreUrlParams { /0001 { /glob "*" /type "allow" } /0002 { /glob "q" /type "deny" } }
https://stackoverflow.com/questions/40764668
复制