缓存策略增加预热超时时间设置(默认20分钟)

This commit is contained in:
GoEdgeLab
2023-08-06 17:06:28 +08:00
parent 649de2ad60
commit 43f2f25646
6 changed files with 31 additions and 2 deletions

View File

@@ -61,6 +61,7 @@ func (this *UpdateAction) RunPost(params struct {
CapacityJSON []byte
MaxSizeJSON []byte
SyncCompressionCache bool
FetchTimeoutJSON []byte
Description string
IsOn bool
@@ -122,7 +123,7 @@ func (this *UpdateAction) RunPost(params struct {
}
// 校验缓存条件
refs := []*serverconfigs.HTTPCacheRef{}
var refs = []*serverconfigs.HTTPCacheRef{}
if len(params.RefsJSON) > 0 {
err = json.Unmarshal(params.RefsJSON, &refs)
if err != nil {
@@ -146,6 +147,7 @@ func (this *UpdateAction) RunPost(params struct {
Type: params.Type,
OptionsJSON: optionsJSON,
SyncCompressionCache: params.SyncCompressionCache,
FetchTimeoutJSON: params.FetchTimeoutJSON,
})
if err != nil {
this.ErrorPage(err)