1 Star 1 Fork 1

xiaoyutab / xgotool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
clear.go 366 Bytes
一键复制 编辑 原始数据 按行查看 历史
xiaoyutab 提交于 2024-04-30 10:12 . 调整xcron和xcache的目录结构
package xcache
import "sync"
// 清空缓存数据
func Clear() error {
_default.CacheSync = sync.Map{}
// 如果redis地址为空,则直接使用程序缓存
if _default.Hosts == "" {
return nil
}
open()
defer close()
if _default.Connect == nil {
return nil
}
if _, err := _default.Connect.Do("FLUSHDB"); err != nil {
return err
}
return nil
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/xiaoyutab/xgotool.git
git@gitee.com:xiaoyutab/xgotool.git
xiaoyutab
xgotool
xgotool
v0.3.14

搜索帮助

344bd9b3 5694891 D2dac590 5694891