设置出站“过期:”在 Squid 服务器的 HTTP 标头中

发布于 2024-08-15 18:21:27 字数 634 浏览 2 评论 0原文

我遇到一个问题,即由我的 Squid 服务器提供的项目被 Limelight 缓存了太长时间,有时甚至是几天。当一段内容长时间(几周)处于静态,然后在几个小时内经历大量变化时,就会发生这种情况。

Limelight 从我们的 Squid 服务器获取其内容,并且我被告知,如果我可以在 Squid 服务器发送的 HTTP 标头中添加“Expires: 15m”,Limelight 不会将图像缓存超过 15 分钟。

不幸的是,我不喜欢 Squid 中的任何设置允许我将其添加到标题中。

这是当前发送的 HTTP 标头:

<预><代码>HTTP/1.0 200 好的 日期:2009 年 12 月 15 日,星期二 23:57:33 GMT 服务器:nginx/0.5.26 内容类型:图像/jpeg 内容长度:83843 最后修改时间:2009 年 12 月 15 日星期二 23:52:00 GMT 接受范围:字节 年龄:450 X-Cache:来自squid01.prod.mydomain 的命中 X-Cache-Lookup:来自squid01.prod.mydomain的命中:3128 通过:1.0 squid01.prod.mydomain:3128 (squid/2.6.STABLE14) 连接:关闭

I'm having a problem where items served by my Squid server are being cached by Limelight for too long, sometimes days. It happens when a piece of content has been static for a long time (weeks) and then undergoes numerous changes in a matter of hours.

Limelight gets its content from our Squid server and I'm told that if I can add 'Expires: 15m' in the HTTP header the Squid server sends, Limelight will not cache the image for more than 15 min.

Unfortunately, I can fond no setting in Squid that will allow me to add this to the header.

Here's the HTTP header as presently being sent:

HTTP/1.0 200 OK
Date: Tue, 15 Dec 2009 23:57:33 GMT
Server: nginx/0.5.26
Content-Type: image/jpeg
Content-Length: 83843   
Last-Modified: Tue, 15 Dec 2009 23:52:00 GMT
Accept-Ranges: bytes
Age: 450
X-Cache: HIT from squid01.prod.mydomain
X-Cache-Lookup: HIT from squid01.prod.mydomain:3128
Via: 1.0 squid01.prod.mydomain:3128 (squid/2.6.STABLE14)
Connection: close

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

泪痕残 2024-08-22 18:21:27

您需要在源服务器上设置标头,而不是在您的 Squid 盒子上。

看:
http://www.mnot.net/cache_docs/#IMP-SERVER

You need to set the header on the origin server, not on your Squid box.

See:
http://www.mnot.net/cache_docs/#IMP-SERVER

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文