1
This commit is contained in:
parent
d706ab1384
commit
e56eae36ab
2
server/marketserver/cache/cachemgr.go
vendored
2
server/marketserver/cache/cachemgr.go
vendored
@ -48,7 +48,7 @@ func (this *cacheMgr) fastGetNft(dto *common.NftDto) {
|
|||||||
func (this *cacheMgr) internalGetNft(dto *common.NftDto) {
|
func (this *cacheMgr) internalGetNft(dto *common.NftDto) {
|
||||||
key := dto.GetKey()
|
key := dto.GetKey()
|
||||||
if p, ok := this.nftHash.Load(key); ok {
|
if p, ok := this.nftHash.Load(key); ok {
|
||||||
if q5.GetTickCount() - (*p).refreshTick < 1000 * 15 {
|
if q5.GetTickCount() - (*p).refreshTick < 1000 * 30 {
|
||||||
dto.NftCache = *p
|
dto.NftCache = *p
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
3
server/marketserver/cache/nft.go
vendored
3
server/marketserver/cache/nft.go
vendored
@ -2,6 +2,7 @@ package cache
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"q5"
|
"q5"
|
||||||
|
"math/rand"
|
||||||
)
|
)
|
||||||
|
|
||||||
type nft struct {
|
type nft struct {
|
||||||
@ -20,6 +21,6 @@ func (this *nft) GetJsonData() interface{} {
|
|||||||
|
|
||||||
func newNft() *nft {
|
func newNft() *nft {
|
||||||
p := new(nft)
|
p := new(nft)
|
||||||
p.refreshTick = q5.GetTickCount()
|
p.refreshTick = q5.GetTickCount() + rand.Int63n(3000)
|
||||||
return p
|
return p
|
||||||
}
|
}
|
||||||
|
2
third_party/q5
vendored
2
third_party/q5
vendored
@ -1 +1 @@
|
|||||||
Subproject commit a0122ba8e585eb43765351cf206e319796e1d04a
|
Subproject commit 5c996e016a729bca02382da12fabdda5dd1c9de0
|
Loading…
x
Reference in New Issue
Block a user