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

This commit is contained in:
刘祥超
2023-08-06 17:06:28 +08:00
parent 7f765f4267
commit 3c44e14386
6 changed files with 31 additions and 2 deletions

View File

@@ -26,6 +26,12 @@ func (this *PolicyAction) RunGet(params struct {
}
this.Data["cachePolicy"] = cachePolicy
// 预热超时时间
this.Data["fetchTimeoutString"] = ""
if cachePolicy.FetchTimeout != nil && cachePolicy.FetchTimeout.Count > 0 {
this.Data["fetchTimeoutString"] = cachePolicy.FetchTimeout.Description()
}
this.Data["typeName"] = serverconfigs.FindCachePolicyStorageName(cachePolicy.Type)
// 正在使用此策略的集群
@@ -34,7 +40,7 @@ func (this *PolicyAction) RunGet(params struct {
this.ErrorPage(err)
return
}
clusterMaps := []maps.Map{}
var clusterMaps = []maps.Map{}
for _, cluster := range clustersResp.NodeClusters {
clusterMaps = append(clusterMaps, maps.Map{
"id": cluster.Id,