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 /build | |
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 'build')
-rw-r--r-- | build/database.js | 8 |
1 files changed, 4 insertions, 4 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); |