gpt4 book ai didi

apache - 如何使用 get 参数强制调度程序缓存 url

转载 作者:行者123 更新时间:2023-12-02 00:48:11 25 4
gpt4 key购买 nike

阅读这些链接后我了解到:

How to find out what does dispatcher cache?

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 提供服务,并从调度程序缓存中提供后续请求。

最佳答案

我认为配置 /ignoreUrlParams 就是您正在寻找的内容。它可用于将查询参数列入白名单,这些参数用于确定页面是否被缓存/从缓存传递。

检查http://docs.adobe.com/docs/en/dispatcher/disp-config.html#Ignoring%20URL%20Parameters了解详情。

关于apache - 如何使用 get 参数强制调度程序缓存 url,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27290738/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com