This commit is contained in:
aozhiwei 2024-03-22 16:36:35 +08:00
parent 976d830258
commit e61c34c069

View File

@ -6,7 +6,6 @@ import (
) )
type CacheMgr struct { type CacheMgr struct {
mu sync.Mutex
cacheMutex sync.Mutex cacheMutex sync.Mutex
cachePlayerProfiles map[string]*common.CachePlayerProfile cachePlayerProfiles map[string]*common.CachePlayerProfile
} }
@ -18,10 +17,6 @@ func (this *CacheMgr) init() {
func (this *CacheMgr) UnInit() { func (this *CacheMgr) UnInit() {
} }
func (this *CacheMgr) SyncGetUsers(accountIds []string, cb func(bool)) {
}
func (this *CacheMgr) AsyncGetUsers(accountIds []string, cb func(bool)) { func (this *CacheMgr) AsyncGetUsers(accountIds []string, cb func(bool)) {
var wg sync.WaitGroup var wg sync.WaitGroup
successCount := 0 successCount := 0
@ -57,7 +52,7 @@ func (this *CacheMgr) AsyncGetUsers(accountIds []string, cb func(bool)) {
} }
} }
func (this *CacheMgr) AddPlayerProfile(version int, playerProfile *common.PlayerProfile) { func (this *CacheMgr) addPlayerProfile(version int, playerProfile *common.PlayerProfile) {
this.cachePlayerProfiles[playerProfile.AccountId] = &common.CachePlayerProfile{ this.cachePlayerProfiles[playerProfile.AccountId] = &common.CachePlayerProfile{
Version: version, Version: version,
Data: playerProfile, Data: playerProfile,