diff options
author | mat <github@matdoes.dev> | 2021-06-01 03:04:55 -0500 |
---|---|---|
committer | mat <github@matdoes.dev> | 2021-06-01 03:04:55 -0500 |
commit | 0203c2bf6d645e2f0c42fc3dc839e1320ee57c84 (patch) | |
tree | 2c29fe15a150298f0d8249863b735f612ed9c359 /src/database.ts | |
parent | ddf7ff4ab6331f70e313de29eafdcc03d67074ad (diff) | |
download | skyblock-api-0203c2bf6d645e2f0c42fc3dc839e1320ee57c84.tar.gz skyblock-api-0203c2bf6d645e2f0c42fc3dc839e1320ee57c84.tar.bz2 skyblock-api-0203c2bf6d645e2f0c42fc3dc839e1320ee57c84.zip |
Revert "temporarily disable leaderboard cache"
This reverts commit ddf7ff4ab6331f70e313de29eafdcc03d67074ad.
Diffstat (limited to 'src/database.ts')
-rw-r--r-- | src/database.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/database.ts b/src/database.ts index f5c313c..577bd6a 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) |