Age改为在缓存中的已存活时间

This commit is contained in:
刘祥超
2022-03-20 21:17:54 +08:00
parent 3c75d860e4
commit eb6cc9d781

View File

@@ -331,7 +331,7 @@ func (this *HTTPRequest) doCacheRead(useStale bool) (shouldStop bool) {
}
// 设置cache.age变量
var age = strconv.FormatInt(reader.ExpiresAt()-utils.UnixTime(), 10)
var age = strconv.FormatInt(utils.UnixTime()-reader.LastModified(), 10)
this.varMapping["cache.age"] = age
if addStatusHeader {