fix: great divide user stats cache length
This commit is contained in:
parent
0df034c46c
commit
3158d4ef91
1 changed files with 1 additions and 1 deletions
|
|
@ -109,7 +109,7 @@ chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) {
|
||||||
let Statistics = result['PolyPlus_GreatDivideStats_' + request.userID]
|
let Statistics = result['PolyPlus_GreatDivideStats_' + request.userID]
|
||||||
|
|
||||||
// cache for 5 minutes
|
// cache for 5 minutes
|
||||||
if (Statistics !== undefined && (new Date().getTime() - Statistics.requested < 5000)) {
|
if (Statistics !== undefined && (new Date().getTime() - Statistics.requested < 300000)) {
|
||||||
Statistics = Statistics.data
|
Statistics = Statistics.data
|
||||||
} else {
|
} else {
|
||||||
Statistics = (await (await fetch('https://stats.silly.mom/player_stats?id=' + request.userID)).json()).results[0]
|
Statistics = (await (await fetch('https://stats.silly.mom/player_stats?id=' + request.userID)).json()).results[0]
|
||||||
|
|
|
||||||
Reference in a new issue