文件扩展名是否与Sling中的url扩展名相同

时间:2014-12-05 12:05:22

标签: caching cq5 dispatcher aem sling

Sling中的网址具有以下结构:enter image description here

此外,我已阅读以下information aboutn dispatcher cache

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)

我有两个误解:

  1. myurl.com/foo.jsp/parameter/values是否符合以下规则:

    缺少文件扩展名。 Web服务器需要扩展名来确定文档类型(MIME类型)。

    1. 制定 Dispatcher始终直接从AEM实例请求文档并不保证在其他情况下请求将被缓存,但我想确保我的请求将被缓存。
    2. P.S

      请从一开始就提供具体步骤,如何检查具体网址是否兑现。

2 个答案:

答案 0 :(得分:0)

该Cheatsheet仅描述了如何选择脚本来呈现特定请求。它与Apache Dispatcher无关。

当我回答in your other question调度程序缓存或缓存的内容是由您设置的规则定义的(除了上述例外情况)。

检查特定请求是否将被缓存的步骤是获取该请求并将其与每个调度程序规则进行比较。应用最后一个匹配规则。

resourceTypes和其他吊索概念在这里无关紧要。仅检查url字符串。您的示例网址没有扩展名,因此不会被缓存。

答案 1 :(得分:0)

你不应该使用foo.jsp,你应该使用foo.html或任何你想要的格式。

"后缀"在吊索是你正在谈论的部分aobut /参数/什么之后的.html

根据我的理解和文档,如果没有查询字符串,这应由调度程序缓存。

相关问题