halo-sigs / plugin-page-cache

为 Halo 2 提供页面的静态缓存功能,提高页面访问速度。
https://www.halo.run/store/apps/app-BaamQ
GNU General Public License v3.0
4 stars 1 forks source link

【BUG】1.1.0 插件实际未启用 #8

Closed Anyexyz closed 1 week ago

Anyexyz commented 3 weeks ago

据 #7 提到的:"如果经过了缓存,插件会在响应头里加上 X-Halo-Cache-At"实测未找到,使用新环境 Halo-pro:2.18.1 + 插件 1.1.0 同样如此。 效果如下: fdca930e3701bbe27e89b6887ca945b

image

JohnNiang commented 3 weeks ago

/kind bug /assign

JohnNiang commented 3 weeks ago

想要击中缓存的条件有以下几点:

  1. 请求头 Accept 必须包含 text/html,仅有 * 无效
  2. 请求方法必须是 GET
  3. 请求头 Cache-Control 中不能包含 no-cache
  4. 请求用户是匿名

目前尚不清楚 ITDOG 实际请求的请求头到底是怎么样的。所以无法判定是否是当前插件导致的问题

JohnNiang commented 3 weeks ago

Hi @Anyexyz ,请问匿名用户二次请求问题是否还存在呢?

/kind support /remove-kind bug

Anyexyz commented 3 weeks ago

匿名二次请求没问题了,并发还需优化

JohnNiang commented 3 weeks ago

匿名二次请求没问题了,并发还需优化

目前尚不清楚 itdog 的请求逻辑,无法通过以上结果判断是当前插件导致的并发问题。不过我会尝试通过专门的测试工具来测试并发问题。不过你可以考虑测试一下启用和不启用缓存插件两种情况的结果。

JohnNiang commented 1 week ago

/close

f2c-ci-robot[bot] commented 1 week ago

@JohnNiang: Closing this issue.

In response to [this](https://github.com/halo-sigs/plugin-page-cache/issues/8#issuecomment-2325905648): >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.