cache.go 411 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * @desc:缓存处理
  3. * @company:云南奇讯科技有限公司
  4. * @Author: yixiaohu
  5. * @Date: 2022/3/9 11:15
  6. */
  7. package service
  8. import (
  9. "github.com/tiger1103/gfast-cache/cache"
  10. )
  11. type ICache interface {
  12. cache.IGCache
  13. }
  14. var c ICache
  15. func Cache() ICache {
  16. if c == nil {
  17. panic("implement not found for interface ICache, forgot register?")
  18. }
  19. return c
  20. }
  21. func RegisterCache(che ICache) {
  22. c = che
  23. }