This website works better with JavaScript.
首頁
探索
說明
登入
zhimeng
/
ad_platform
關註
2
收藏
0
複製
0
程式碼
問題管理
0
合併請求
0
版本發佈
0
Wiki
Activity
瀏覽代碼
更新
master
huangjiajun
2 月之前
父節點
a069244b57
當前提交
898e017dad
共有
2 個文件被更改
,包括
12 次插入
和
0 次删除
分割檢視
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-0
app/hdl/hdl_set_center.go
+10
-0
app/svc/svc_redis.go
+ 2
- 0
app/hdl/hdl_set_center.go
查看文件
@@ -50,6 +50,7 @@ func SetOss(c *gin.Context) {
svc.ClearRedis(c, masterId, enum.FileBucketHost)
svc.ClearRedis(c, masterId, enum.FileBucketRegion)
svc.ClearRedis(c, masterId, enum.FileBucket)
svc.ClearAllRedis(c, masterId)
e.OutSuc(c, "success", nil)
return
}
@@ -502,6 +503,7 @@ func SetMob(c *gin.Context) {
sysCfgDb.SysCfgUpdate("mob_app_secret", req.MobAppSecret)
svc.ClearRedis(c, masterId, "mob_app_key")
svc.ClearRedis(c, masterId, "mob_app_secret")
svc.ClearAllRedis(c, masterId)
e.OutSuc(c, "success", nil)
return
}
+ 10
- 0
app/svc/svc_redis.go
查看文件
@@ -9,4 +9,14 @@ import (
func ClearRedis(c *gin.Context, masterId, key string) {
key1 := fmt.Sprintf("%s:cfg_cache:%s", masterId, key)
cache.Del(key1)
}
func ClearAllRedis(c *gin.Context, masterId string) {
var str = []string{"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "%!s(MISSING)"}
for _, v := range str {
key1 := fmt.Sprintf("%s:cfg_cache:%s", masterId, v)
cache.Del(key1)
}
}
Write
Preview
Loading…
取消
儲存