广告平台(站长使用)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

23 line
541 B

  1. package svc
  2. import (
  3. "applet/app/utils/cache"
  4. "fmt"
  5. "github.com/gin-gonic/gin"
  6. )
  7. func ClearRedis(c *gin.Context, masterId, key string) {
  8. key1 := fmt.Sprintf("%s:cfg_cache:%s", masterId, key)
  9. cache.Del(key1)
  10. }
  11. func ClearAllRedis(c *gin.Context, masterId string) {
  12. 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)"}
  13. for _, v := range str {
  14. key1 := fmt.Sprintf("%s:cfg_cache:%s", masterId, v)
  15. cache.Del(key1)
  16. }
  17. }