1
This commit is contained in:
parent
d6f8ed4836
commit
d706ab1384
10
server/marketserver/cache/cachemgr.go
vendored
10
server/marketserver/cache/cachemgr.go
vendored
@ -48,8 +48,15 @@ func (this *cacheMgr) fastGetNft(dto *common.NftDto) {
|
||||
func (this *cacheMgr) internalGetNft(dto *common.NftDto) {
|
||||
key := dto.GetKey()
|
||||
if p, ok := this.nftHash.Load(key); ok {
|
||||
if q5.GetTickCount() - (*p).refreshTick < 1000 * 15 {
|
||||
dto.NftCache = *p
|
||||
} else {
|
||||
return
|
||||
}
|
||||
this.nftHash.Delete(key)
|
||||
if !f5.IsOnlineEnv() {
|
||||
f5.GetSysLog().Warning("remove cache %s", dto.TokenId)
|
||||
}
|
||||
}
|
||||
l := f5.AllocLock(key)
|
||||
defer f5.ReleaseLock(l)
|
||||
if p, ok := this.nftHash.Load(key); ok {
|
||||
@ -73,7 +80,6 @@ func (this *cacheMgr) internalGetNft(dto *common.NftDto) {
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (this *cacheMgr) batchGetNfts(nfts []*common.NftDto) {
|
||||
keys := []string{}
|
||||
|
Loading…
x
Reference in New Issue
Block a user