aboutsummaryrefslogtreecommitdiff
path: root/build/hypixelCached.js
diff options
context:
space:
mode:
Diffstat (limited to 'build/hypixelCached.js')
-rw-r--r--build/hypixelCached.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/build/hypixelCached.js b/build/hypixelCached.js
index 626aaed..702a23e 100644
--- a/build/hypixelCached.js
+++ b/build/hypixelCached.js
@@ -27,6 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.fetchProfileName = exports.fetchBasicProfileFromUuid = exports.fetchProfile = exports.fetchProfileUuid = exports.fetchSkyblockProfiles = exports.fetchBasicPlayer = exports.fetchPlayer = exports.usernameFromUser = exports.uuidFromUser = exports.profileNameCache = exports.profilesCache = exports.profileCache = exports.basicPlayerCache = exports.playerCache = exports.basicProfilesCache = exports.usernameCache = void 0;
const node_cache_1 = __importDefault(require("node-cache"));
+const lru_cache_1 = __importDefault(require("lru-cache"));
const mojang = __importStar(require("./mojang"));
const hypixel = __importStar(require("./hypixel"));
const util_1 = require("./util");
@@ -49,10 +50,9 @@ exports.playerCache = new node_cache_1.default({
useClones: true,
});
// cache "basic players" (players without profiles) for 4 hours
-exports.basicPlayerCache = new node_cache_1.default({
- stdTTL: 60 * 60 * 4,
- checkperiod: 60 * 10,
- useClones: true
+exports.basicPlayerCache = new lru_cache_1.default({
+ max: 10000,
+ maxAge: 60 * 60 * 4 * 1000,
});
exports.profileCache = new node_cache_1.default({
stdTTL: 30,