diff options
author | mat <github@matdoes.dev> | 2021-06-01 15:12:22 -0500 |
---|---|---|
committer | mat <github@matdoes.dev> | 2021-06-01 15:12:22 -0500 |
commit | 55d5d936d7ccc2b78ea1de6f07e71f9e1e2c9b74 (patch) | |
tree | 2c29fe15a150298f0d8249863b735f612ed9c359 | |
parent | f111a9a1db78fbfe0737661f3c9104f52d6de945 (diff) | |
download | skyblock-api-55d5d936d7ccc2b78ea1de6f07e71f9e1e2c9b74.tar.gz skyblock-api-55d5d936d7ccc2b78ea1de6f07e71f9e1e2c9b74.tar.bz2 skyblock-api-55d5d936d7ccc2b78ea1de6f07e71f9e1e2c9b74.zip |
Revert "Revert "Revert "temporarily disable leaderboard cache"""
This reverts commit f111a9a1db78fbfe0737661f3c9104f52d6de945.
-rw-r--r-- | build/database.js | 8 | ||||
-rw-r--r-- | src/database.ts | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/build/database.js b/build/database.js index 66bf90f..7c7d192 100644 --- a/build/database.js +++ b/build/database.js @@ -229,7 +229,7 @@ async function fetchMemberLeaderboardRaw(name) { }; }); fetchingRawLeaderboardNames.delete(name); - // cachedRawLeaderboards.set(name, leaderboardRaw) + exports.cachedRawLeaderboards.set(name, leaderboardRaw); return leaderboardRaw; } async function fetchProfileLeaderboardRaw(name) { @@ -262,7 +262,7 @@ async function fetchProfileLeaderboardRaw(name) { }; }); fetchingRawLeaderboardNames.delete(name); - // cachedRawLeaderboards.set(name, leaderboardRaw) + exports.cachedRawLeaderboards.set(name, leaderboardRaw); return leaderboardRaw; } /** Fetch a leaderboard that ranks members, as opposed to profiles */ @@ -448,7 +448,7 @@ async function updateDatabaseMember(member, profile) { }]) .sort((a, b) => leaderboardReverse ? a.value - b.value : b.value - a.value) .slice(0, 100); - // cachedRawLeaderboards.set(attributeName, newRawLeaderboard) + exports.cachedRawLeaderboards.set(attributeName, newRawLeaderboard); } if (_1.debug) console.debug('added member to leaderboards', member.username, leaderboardAttributes); @@ -496,7 +496,7 @@ async function updateDatabaseProfile(profile) { }]) .sort((a, b) => leaderboardReverse ? a.value - b.value : b.value - a.value) .slice(0, 100); - // cachedRawLeaderboards.set(attributeName, newRawLeaderboard) + exports.cachedRawLeaderboards.set(attributeName, newRawLeaderboard); } if (_1.debug) console.debug('added profile to leaderboards', profile.name, leaderboardAttributes); 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) |