aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2021-06-01 15:12:07 -0500
committermat <github@matdoes.dev>2021-06-01 15:12:07 -0500
commitf111a9a1db78fbfe0737661f3c9104f52d6de945 (patch)
treed28b5831445182440c7367368e58eb78fe1b78b2 /src
parent0203c2bf6d645e2f0c42fc3dc839e1320ee57c84 (diff)
downloadskyblock-api-f111a9a1db78fbfe0737661f3c9104f52d6de945.tar.gz
skyblock-api-f111a9a1db78fbfe0737661f3c9104f52d6de945.tar.bz2
skyblock-api-f111a9a1db78fbfe0737661f3c9104f52d6de945.zip
Revert "Revert "temporarily disable leaderboard cache""
This reverts commit 0203c2bf6d645e2f0c42fc3dc839e1320ee57c84.
Diffstat (limited to 'src')
-rw-r--r--src/database.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/database.ts b/src/database.ts
index 577bd6a..f5c313c 100644
--- a/src/database.ts
+++ b/src/database.ts
@@ -313,7 +313,7 @@ async function fetchMemberLeaderboardRaw(name: string): Promise<memberRawLeaderb
}
})
fetchingRawLeaderboardNames.delete(name)
- cachedRawLeaderboards.set(name, leaderboardRaw)
+ // cachedRawLeaderboards.set(name, leaderboardRaw)
return leaderboardRaw
}
@@ -352,7 +352,7 @@ async function fetchProfileLeaderboardRaw(name: string): Promise<profileRawLeade
})
fetchingRawLeaderboardNames.delete(name)
- cachedRawLeaderboards.set(name, leaderboardRaw)
+ // cachedRawLeaderboards.set(name, leaderboardRaw)
return leaderboardRaw
}
@@ -590,7 +590,7 @@ export async function updateDatabaseMember(member: CleanMember, profile: CleanFu
}])
.sort((a, b) => leaderboardReverse ? a.value - b.value : b.value - a.value)
.slice(0, 100)
- cachedRawLeaderboards.set(attributeName, newRawLeaderboard)
+ // cachedRawLeaderboards.set(attributeName, newRawLeaderboard)
}
if (debug) console.debug('added member to leaderboards', member.username, leaderboardAttributes)
@@ -645,7 +645,7 @@ export async function updateDatabaseProfile(profile: CleanFullProfile): Promise<
}])
.sort((a, b) => leaderboardReverse ? a.value - b.value : b.value - a.value)
.slice(0, 100)
- cachedRawLeaderboards.set(attributeName, newRawLeaderboard)
+ // cachedRawLeaderboards.set(attributeName, newRawLeaderboard)
}
if (debug) console.debug('added profile to leaderboards', profile.name, leaderboardAttributes)