package user_cron import ( "git.hilo.cn/hilo-common/domain" "github.com/robfig/cron" "hilo-group/domain/cache/user_c" ) // 加载数据到lru func LoadSvipVipNoble() { go user_c.LoadAllSvipVipNoble(domain.CreateModelNil()) // 启动先执行一次 c := cron.New() spec := "0 */30 * * * ?" _ = c.AddFunc(spec, func() { model := domain.CreateModelNil() user_c.LoadAllSvipVipNoble(model) }) c.Start() }