mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-26 06:56:35 +08:00
如果缓存条件支持206 Partial Content,则第一次加载时自动尝试从分片缓存中读取内容
This commit is contained in:
@@ -312,9 +312,10 @@ 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, write cache failed")
|
||||
} else {
|
||||
this.Header().Set("X-Cache", "BYPASS, "+err.Error())
|
||||
}
|
||||
|
||||
this.Header().Set("X-Cache", "BYPASS, too many requests")
|
||||
return
|
||||
}
|
||||
this.cacheWriter = cacheWriter
|
||||
|
||||
Reference in New Issue
Block a user