JM-WechatMini/initialize/other.go
2023-11-02 04:34:46 +08:00

24 lines
419 B
Go

package initialize
import (
"github.com/songzhibin97/gkit/cache/local_cache"
"miniapp/global"
"miniapp/utils"
)
func OtherInit() {
dr, err := utils.ParseDuration(global.GVA_CONFIG.JWT.ExpiresTime)
if err != nil {
panic(err)
}
_, err = utils.ParseDuration(global.GVA_CONFIG.JWT.BufferTime)
if err != nil {
panic(err)
}
global.BlackCache = local_cache.NewCache(
local_cache.SetDefaultExpire(dr),
)
}