1
This commit is contained in:
parent
976d830258
commit
e61c34c069
9
server/imserver_new/cache/cachemgr.go
vendored
9
server/imserver_new/cache/cachemgr.go
vendored
@ -6,8 +6,7 @@ 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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user