如何使用get参数强制调度程序缓存URL [英] How to force dispatcher cache urls with get parameters
问题描述
据我阅读这些链接后的理解:
As I understood after reading these links:
http://docs.adobe.com/docs/en/dispatcher.html
The Dispatcher always requests the document directly from the AEM instance in the following cases:
If the HTTP method is not GET. Other common methods are POST for form data and HEAD for the HTTP header.
If the request URI contains a question mark "?". This usually indicates a dynamic page, such as a search result, which does not need to be cached.
The file extension is missing. The web server needs the extension to determine the document type (the MIME-type).
The authentication header is set (this can be configured)
但是我想缓存url
如果我曾经请求 myUrl /?p1 = 1& p2 = 2& p3 = 3
然后必须由调度程序处理对 myUrl /?p1 = 1& p2 = 2& p3 = 3
的下一个请求缓存,但 myUrl /?p1 = 1& p2 = 2& p3 = 3& newParam = newValue
应该由CQ首次提供,并应从分派器缓存中进行后续请求。
then next request to myUrl/?p1=1&p2=2&p3=3
must be served from dispatcher cache, but myUrl/?p1=1&p2=2&p3=3&newParam=newValue
should served by CQ for the first time and from dispatcher cache for subsequent requests.
推荐答案
我认为config / ignoreUrlParams
是您要寻找的配置。它可以用来将用于确定是否缓存页面或是否从缓存中传递页面的查询参数列入白名单。
I think the config /ignoreUrlParams
is what you are looking for. It can be used to white list the query parameters which are used to determine whether a page is cached / delivered from cache or not.
选中 http://docs.adobe.com/docs/zh-CN/dispatcher/disp -config.html#Ignoring%20URL%20Parameters 了解详情。
这篇关于如何使用get参数强制调度程序缓存URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!