广告平台(站长使用)
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

il y a 6 jours
il y a 6 jours
il y a 6 jours
il y a 6 jours
il y a 6 jours
il y a 6 jours
il y a 6 jours
123456789101112131415161718192021222324
  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. key2 := fmt.Sprintf("%s:cfg_cache:%s", "", v)
  17. cache.Del(key2)
  18. }
  19. }