优化缓存相关代码

This commit is contained in:
GoEdgeLab
2022-04-14 09:36:02 +08:00
parent 024035943a
commit 0649eb0efe
9 changed files with 71 additions and 62 deletions

View File

@@ -313,6 +313,8 @@ func (this *HTTPWriter) PrepareCache(resp *http.Response, size int64) {
if !caches.CanIgnoreErr(err) {
remotelogs.Error("HTTP_WRITER", "write cache failed: "+err.Error())
}
this.Header().Set("X-Cache", "BYPASS, open failed")
return
}
this.cacheWriter = cacheWriter