From 89506a15c0ca5d9d78663b6c9bd91cc6fc86ae50 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Wed, 23 Dec 2020 21:33:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E4=B8=80=E4=B8=AA=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/actions/default/servers/components/cache/preheat.go | 6 +++--- .../web/actions/default/servers/components/cache/purge.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/web/actions/default/servers/components/cache/preheat.go b/internal/web/actions/default/servers/components/cache/preheat.go index e4ee2b04..557a2d98 100644 --- a/internal/web/actions/default/servers/components/cache/preheat.go +++ b/internal/web/actions/default/servers/components/cache/preheat.go @@ -57,6 +57,9 @@ func (this *PreheatAction) RunPost(params struct { Must *actions.Must }) { + // 创建日志 + defer this.CreateLog(oplogs.LevelInfo, "预热缓存,缓存策略:%d", params.CachePolicyId) + // 记录clusterId this.AddCookie(&http.Cookie{ Name: "cache_cluster_id", @@ -111,8 +114,5 @@ func (this *PreheatAction) RunPost(params struct { this.Data["isAllOk"] = isAllOk this.Data["results"] = results - // 创建日志 - defer this.CreateLog(oplogs.LevelInfo, "预热缓存,缓存策略:%d", params.CachePolicyId) - this.Success() } diff --git a/internal/web/actions/default/servers/components/cache/purge.go b/internal/web/actions/default/servers/components/cache/purge.go index 9cd0caf8..809d1dff 100644 --- a/internal/web/actions/default/servers/components/cache/purge.go +++ b/internal/web/actions/default/servers/components/cache/purge.go @@ -56,6 +56,9 @@ func (this *PurgeAction) RunPost(params struct { Keys string Must *actions.Must }) { + // 创建日志 + defer this.CreateLog(oplogs.LevelInfo, "删除缓存,缓存策略:%d", params.CachePolicyId) + // 记录clusterId this.AddCookie(&http.Cookie{ Name: "cache_cluster_id", @@ -110,8 +113,5 @@ func (this *PurgeAction) RunPost(params struct { this.Data["isAllOk"] = isAllOk this.Data["results"] = results - // 创建日志 - defer this.CreateLog(oplogs.LevelInfo, "删除缓存,缓存策略:%d", params.CachePolicyId) - this.Success() }