This commit is contained in:
aozhiwei 2024-06-29 14:57:58 +08:00
parent d706ab1384
commit e56eae36ab
3 changed files with 4 additions and 3 deletions

View File

@ -48,7 +48,7 @@ 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 {
if q5.GetTickCount() - (*p).refreshTick < 1000 * 30 {
dto.NftCache = *p
return
}

View File

@ -2,6 +2,7 @@ package cache
import (
"q5"
"math/rand"
)
type nft struct {
@ -20,6 +21,6 @@ func (this *nft) GetJsonData() interface{} {
func newNft() *nft {
p := new(nft)
p.refreshTick = q5.GetTickCount()
p.refreshTick = q5.GetTickCount() + rand.Int63n(3000)
return p
}

2
third_party/q5 vendored

@ -1 +1 @@
Subproject commit a0122ba8e585eb43765351cf206e319796e1d04a
Subproject commit 5c996e016a729bca02382da12fabdda5dd1c9de0