cache.go 280 B

123456789101112
  1. package svc
  2. import "time"
  3. const cacheWechatTokenPrefix = "cache:wechat:token:"
  4. // Cache defined
  5. type Cache interface {
  6. SetCache(key string, v interface{}) error
  7. GetCache(key string, v interface{}) error
  8. SetWithExpire(key string, v interface{}, expire time.Duration) error
  9. }