VCL_FETCH_VERBOSE_V3 = '''\
# Varnish determined the object was not cacheable
if (beresp.ttl <= 0s) {
set beresp.http.X-Cacheable = "NO:Not Cacheable";
# You don't wish to cache content for logged in users
} elsif (req.http.Cookie ~ "(UserID|_session)") {
set beresp.http.X-Cacheable = "NO:Got Session";
return(hit_for_pass);
# You are respecting the Cache-Control=private header from the backend
} elsif (beresp.http.Cache-Control ~ "private") {
set beresp.http.X-Cacheable = "NO:Cache-Control=private";
return(hit_for_pass);
# Varnish determined the object was cacheable
} else {
set beresp.http.X-Cacheable = "YES";
}
'''
VCL_FETCH_SAINT = '''
if (beresp.status >=500 && beresp.status < 600) {
set beresp.saintmode = 10s;
return(hit_for_pass);
}
'''
VCL_DELIVER_VERBOSE = '''\
if (obj.hits > 0) {
set resp.http.X-Cache = "HIT";
} else {
set resp.http.X-Cache = "MISS";
}
'''
PyPI 官网下载 | plone.recipe.varnish-6.0.0b2.tar.gz
版权申诉
96 浏览量
2022-01-29
04:15:27
上传
评论
收藏 53KB GZ 举报
挣扎的蓝藻
- 粉丝: 12w+
- 资源: 15万+