初始
This commit is contained in:
29
internal/app/common/service/cache.go
Normal file
29
internal/app/common/service/cache.go
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* @desc:缓存处理
|
||||
* @company:云南奇讯科技有限公司
|
||||
* @Author: yixiaohu
|
||||
* @Date: 2022/3/9 11:15
|
||||
*/
|
||||
|
||||
package service
|
||||
|
||||
import (
|
||||
"github.com/tiger1103/gfast-cache/cache"
|
||||
)
|
||||
|
||||
type ICache interface {
|
||||
cache.IGCache
|
||||
}
|
||||
|
||||
var c ICache
|
||||
|
||||
func Cache() ICache {
|
||||
if c == nil {
|
||||
panic("implement not found for interface ICache, forgot register?")
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
||||
func RegisterCache(che ICache) {
|
||||
c = che
|
||||
}
|
Reference in New Issue
Block a user