Apache 删除或删除或不在缓存中存储 header (Edge-Cache-Tag)

Apache dropping or removing or not storing a header in cache (Edge-Cache-Tag)

我有一个奇怪的情况,Apache 2.4 不会从其缓存中 return header。我有一个处于发布者模式的 AEM 实例 return 将这些 header 作为其响应的一部分:

Date: Fri, 22 May 2020 22:26:21 GMT
X-Content-Type-Options: nosniff
Edge-Cache-Tag: /en-us/
Content-Type: text/html;charset=utf-8
Transfer-Encoding: chunked

流程基本上是这样的:

当我再次点击 Apache 到 https://ip:443/en-us/ 时,它以 200 响应,但它不是 returning "Edge-Cache-Tag" header。我知道响应来自缓存,因为首先,我在缓存中看到“/content/some/other/path”的条目,如果我使用 https://ip:443/[=46 访问 Apache =]/?foo=bar(绕过缓存的查询参数),header 返回,这意味着响应实际上来自 Web 应用程序,因为查询参数使 Apache 绕过缓存.

我不明白 Apache 为什么要从其响应中删除 "Edge-Cache-Tag"。我已经检查了我所有的 Apache 配置,但我没有删除 headers(比如 Header 未设置)的单一说明。 Apache 不能缓存 "Edge-Cache-Tag"?

这是调度员的正常行为。您必须将 Edge-Cache-Tag 配置为缓存 headers 之一。

https://docs.adobe.com/content/help/en/experience-manager-dispatcher/using/configuring/dispatcher-configuration.html

The /headers property allows you to define the HTTP header types that are going to be cached by the Dispatcher. On the first request to an uncached resource, all headers matching one of the configured values (see the configuration sample below) are stored in a separate file, next to the cache file. On subsequent requests to the cached resource, the stored headers are added to the response.