gpt4 book ai didi

Azure CDN URL 重写不适合缓存

转载 作者:行者123 更新时间:2023-12-03 04:00:50 24 4
gpt4 key购买 nike

我正在尝试在另一个 CDN 之上设置 Azure 标准 CDN(不要问),并且我有以下重写 url 操作来映射路径:

enter image description here

它正在工作,但 Azure CDN 不会缓存响应,即使我有带有显式缓存覆盖的第二个操作。我的 Azure CDN 中的查询字符串缓存行为设置设置为“缓存每个唯一 URL”。我错过了什么?

这是我得到的响应 header :

HTTP/2 200 OK
cache-control: private, no-transform, immutable, max-age=604800
content-length: 48247
content-type: image/jpeg
last-modified: Thu, 18 Jun 2020 10:40:13 GMT
accept-ranges: bytes
etag: "ca5d81db6ff9266ad8fb95bc0e0daf33"
vary: Accept,User-Agent
server: Cloudinary
x-cache: TCP_MISS
x-request-id: b2bc7991c7f737acf00e07627c4e0d9a
strict-transport-security: max-age=604800
server-timing: fastly;dur=1;start=2020-06-18T17:34:56.853Z;desc=hit,rtt;dur=1
timing-allow-origin: *
access-control-allow-origin: *
access-control-expose-headers: Content-Length,ETag,Server-Timing,Vary
x-azure-ref-originshield: 0wKXr....
x-azure-ref: 0wKXr...
date: Thu, 18 Jun 2020 17:34:56 GMT
X-Firefox-Spdy: h2

cache-control 设置为 7 天(原始 CDN 默认值),Azure 的 x-cache 始终为 TCP_MISS :(

最佳答案

收到 Microsoft 支持人员的回复:

a web page response marked as private can be cached by a desktopbrowser, but not a content delivery network (CDN).

基本上,Azure CDN 遵循 cache-control: private 并且不允许更改行为。唯一的选择是修改原始响应。

关于Azure CDN URL 重写不适合缓存,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62456434/

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