cache.go 632 B

1234567891011121314151617181920
  1. package dao
  2. import (
  3. "context"
  4. "strconv"
  5. "go-common/app/service/main/card/model"
  6. )
  7. func (d *Dao) cacheSFEquip(id int64) string {
  8. return strconv.FormatInt(id, 10)
  9. }
  10. //go:generate $GOPATH/src/go-common/app/tool/cache/gen
  11. type _cache interface {
  12. // cache: -batch=50 -max_group=10 -batch_err=continue -nullcache=&model.UserEquip{CardID:-1} -check_null_code=$!=nil&&$.CardID==-1
  13. Equips(c context.Context, keys []int64) (map[int64]*model.UserEquip, error)
  14. // cache: -nullcache=&model.UserEquip{CardID:-1} -check_null_code=$!=nil&&$.CardID==-1 -singleflight=true
  15. Equip(c context.Context, key int64) (*model.UserEquip, error)
  16. }