refresh cache

This commit is contained in:
xtaodada 2022-09-04 00:29:43 +08:00
parent 6c0a5c1c17
commit d80ae3f47c
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -54,9 +54,9 @@ async def getRawData(
avalCharIds = [
str(c["avatarId"]) for c in cacheData["playerInfo"]["showAvatarInfoList"]
]
# if int(time()) - cacheData["time"] > EXPIRE_SEC:
# pass
if charId in avalCharIds:
if int(time()) - cacheData["time"] > EXPIRE_SEC:
pass
elif charId in avalCharIds:
return [
c for c in cacheData["avatarInfoList"] if str(c["avatarId"]) == charId
][0]