Home
Sign Up
Sign In
V2EX
›
问与答
cdn中会缓存空白页面吗?
tywtyw2002
·
Oct 22, 2013
· 3182 views
This topic created in 4777 days ago, the information mentioned may be changed or developed.
upstream 因为错误或者其他原因返回 0 size的页面 with httpcode 200。
这样的情况cdn提供商一般会去会缓存吗?
如果自己用squid、nginx进行pass_proxy的话也会去缓存这个页面吗?
squid设置了强制缓存该url,并且忽略?。
缓存
页面
squid
3 replies
•
1970-01-01 08:00:00 +08:00
tabris17
Oct 22, 2013
1
这个又没有标准,你可以程序中判断下Content-Length大小,等于0的话就返回500啊
tywtyw2002
OP
Oct 22, 2013
2
@
tabris17
目前无法去控制upstream的返回。。。。。
如果纯nginx的话可否判断 content-length == 0 呢?
如果是0 直接跳500,nginx的缓存机制也是建立在成功的基础上,所以在他缓存之前跳就好了。。。。
ine181x
Oct 22, 2013
3
看你自己需求了 不过 content-length=0 的 resopnse 也是存在的,比如心跳检测 API 。
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
4321 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 40ms ·
UTC 08:07
·
PVG 16:07
·
LAX 00:07
·
JFK 03:07
♥ Do have faith in what you're doing.
❯