清理缓存时也清理HEAD缓存

This commit is contained in:
刘祥超
2022-02-22 21:52:28 +08:00
parent 03ce082926
commit 83f581f7f0
3 changed files with 2 additions and 8 deletions

View File

@@ -265,10 +265,6 @@ func (this *HTTPWriter) PrepareCache(resp *http.Response, size int64) {
var expiredAt = utils.UnixTime() + life
var cacheKey = this.req.cacheKey
var method = this.req.Method()
if method != http.MethodGet && method != http.MethodPost {
cacheKey += cacheMethodSuffix + this.req.Method()
}
cacheWriter, err := storage.OpenWriter(cacheKey, expiredAt, this.StatusCode(), size, false)
if err != nil {
if !caches.CanIgnoreErr(err) {