cache.go 608 B

1234567891011121314151617181920212223
  1. package bnj
  2. import "context"
  3. func timeFinishKey() string {
  4. return "time_finish"
  5. }
  6. func lessTimeKey() string {
  7. return "time_less"
  8. }
  9. //go:generate $GOPATH/src/go-common/app/tool/cache/mc
  10. type _mc interface {
  11. // mc: -key=timeFinishKey
  12. CacheTimeFinish(c context.Context) (int64, error)
  13. // mc: -key=timeFinishKey -expire=d.timeFinishExpire -encode=raw
  14. AddCacheTimeFinish(c context.Context, value int64) error
  15. // mc: -key=lessTimeKey
  16. CacheLessTime(c context.Context) (int64, error)
  17. // mc: -key=lessTimeKey -expire=d.lessTimeExpire -encode=raw
  18. AddCacheLessTime(c context.Context, value int64) error
  19. }