refactor(common): 重构缓存管理模块,将cache迁移至share包并实现泛型缓存存储
This commit is contained in:
@@ -6,8 +6,8 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"blazing/common/data/cache"
|
||||
"blazing/common/data/entity"
|
||||
"blazing/common/data/share"
|
||||
|
||||
"github.com/gogf/gf/v2/os/glog"
|
||||
"github.com/panjf2000/gnet/v2"
|
||||
@@ -49,7 +49,8 @@ func (s *Server) OnClose(c gnet.Conn, _ error) (action gnet.Action) {
|
||||
t := v.GetPlayer()
|
||||
if t != nil {
|
||||
glog.Debug(context.Background(), t.UserID, "断开连接")
|
||||
cache.NewSessionManager().DeleteUserOnline(t.UserID) //设置用户登录服务器
|
||||
|
||||
share.ShareManager.DeleteUserOnline(t.UserID) //设置用户登录服务器
|
||||
}
|
||||
|
||||
//}
|
||||
|
||||
Reference in New Issue
Block a user