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

This commit is contained in:
GoEdgeLab
2022-03-20 21:17:54 +08:00
parent a05e206213
commit 9b26182558

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 {