package config import ( "encoding/json" "gadmin/utility/character" "github.com/patrickmn/go-cache" "time" ) var Cache *cache.Cache func InitCache() { Cache = cache.New(10*time.Minute, 15*time.Minute) } func UKey(label string, v interface{}) string { b, _ := json.Marshal(v) return label + ":" + character.Md5Content(b) }