package initialize import ( "github.com/songzhibin97/gkit/cache/local_cache" "lc-base-frame/global" "lc-base-frame/utils" ) func OtherInit() { dr, err := utils.ParseDuration(global.Config.JWT.ExpiresTime) if err != nil { panic(err) } _, err = utils.ParseDuration(global.Config.JWT.BufferTime) if err != nil { panic(err) } //创建缓存,配置过期时间 global.BlackCache = local_cache.NewCache( local_cache.SetDefaultExpire(dr), ) }