cache.go 568 B

12345678910111213141516
  1. package dao
  2. import (
  3. "context"
  4. "go-common/app/service/main/vipinfo/model"
  5. )
  6. // 注意 -check_null_code=$!=nil 生成的代码内容要去掉!
  7. //go:generate $GOPATH/src/go-common/app/tool/cache/gen
  8. type _cache interface {
  9. // cache: -batch=50 -max_group=10 -batch_err=continue -nullcache=&model.VipUserInfo{VipType:0} -check_null_code=$!=nil
  10. Infos(c context.Context, keys []int64) (map[int64]*model.VipUserInfo, error)
  11. // cache: -nullcache=&model.VipUserInfo{VipType:0} -check_null_code=$!=nil
  12. Info(c context.Context, key int64) (*model.VipUserInfo, error)
  13. }