mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2026-01-03 22:04:28 +08:00
优化过时缓存时长(从600秒改为1200秒)
This commit is contained in:
@@ -982,7 +982,7 @@ func (this *HTTPWriter) DelayRead() bool {
|
||||
|
||||
// 计算stale时长
|
||||
func (this *HTTPWriter) calculateStaleLife() int {
|
||||
var staleLife = 600 // TODO 可以在缓存策略里设置此时间
|
||||
var staleLife = caches.DefaultStaleCacheSeconds
|
||||
var staleConfig = this.req.web.Cache.Stale
|
||||
if staleConfig != nil && staleConfig.IsOn {
|
||||
// 从Header中读取stale-if-error
|
||||
|
||||
Reference in New Issue
Block a user