即使使用“override-expire”,鱿鱼也能保持清爽新鲜

即使使用“override-expire”,鱿鱼也能保持清爽新鲜

目标:对于给定的模式,无论如何,在给定的时间内缓存响应。

到目前为止我的squid.conf样子是这样的:

refresh_pattern -i \.git/info/refs 3600 100% 3600 ignore-reload ignore-no-store ignore-private override-expire override-lastmod

但是,每次请求时仍会验证新鲜度:

1665672549.558    236 10.0.2.100 TCP_REFRESH_MODIFIED/200 771 GET https://github.com/appuio/component-openshift4-version.git/info/refs? - HIER_DIRECT/140.82.121.3 application/x-git-upload-pack-advertisement
1665672549.966    155 10.0.2.100 TCP_REFRESH_MODIFIED/200 782 GET https://github.com/appuio/component-openshift4-version.git/info/refs? - HIER_DIRECT/140.82.121.3 application/x-git-upload-pack-advertisement
1665673113.935    149 10.0.2.100 TCP_REFRESH_MODIFIED/200 783 GET https://github.com/appuio/component-openshift4-version.git/info/refs? - HIER_DIRECT/140.82.121.4 application/x-git-upload-pack-advertisement
1665673114.614    442 10.0.2.100 TCP_REFRESH_MODIFIED/200 777 GET https://github.com/appuio/component-openshift4-version.git/info/refs? - HIER_DIRECT/140.82.121.4 application/x-git-upload-pack-advertisement

我怎样才能强制 Squid 缓存这个 URL 一小时?

相关内容