aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package-lock.json14
-rw-r--r--package.json2
-rw-r--r--src/hypixelCached.ts2
-rw-r--r--src/index.ts2
4 files changed, 10 insertions, 10 deletions
diff --git a/package-lock.json b/package-lock.json
index 91cead8..8cdf084 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -22,7 +22,7 @@
},
"devDependencies": {
"@types/express": "^4.17.13",
- "@types/lru-cache": "^5.1.1",
+ "@types/lru-cache": "^7.4.0",
"@types/mocha": "^9.1.0",
"@types/node": "^17.0.21",
"dotenv": "^16.0.0",
@@ -122,9 +122,9 @@
}
},
"node_modules/@types/lru-cache": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz",
- "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==",
+ "version": "7.4.0",
+ "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-7.4.0.tgz",
+ "integrity": "sha512-jZ/Tb2/3vXw4VYd9AImFC/n6XT3WywZNAxwY8Ox9eM87M9ta9G7KzCx4aKo2Zllvr02k40eY328cjOO3WuK5Kw==",
"dev": true
},
"node_modules/@types/mime": {
@@ -2296,9 +2296,9 @@
}
},
"@types/lru-cache": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz",
- "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==",
+ "version": "7.4.0",
+ "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-7.4.0.tgz",
+ "integrity": "sha512-jZ/Tb2/3vXw4VYd9AImFC/n6XT3WywZNAxwY8Ox9eM87M9ta9G7KzCx4aKo2Zllvr02k40eY328cjOO3WuK5Kw==",
"dev": true
},
"@types/mime": {
diff --git a/package.json b/package.json
index b8ddd4f..d624d06 100644
--- a/package.json
+++ b/package.json
@@ -42,7 +42,7 @@
},
"devDependencies": {
"@types/express": "^4.17.13",
- "@types/lru-cache": "^5.1.1",
+ "@types/lru-cache": "^7.4.0",
"@types/mocha": "^9.1.0",
"@types/node": "^17.0.21",
"dotenv": "^16.0.0",
diff --git a/src/hypixelCached.ts b/src/hypixelCached.ts
index 3d8f04c..1cfc639 100644
--- a/src/hypixelCached.ts
+++ b/src/hypixelCached.ts
@@ -39,7 +39,7 @@ export const playerCache = new NodeCache({
// cache "basic players" (players without profiles) for 20 minutes
export const basicPlayerCache: LRUCache<string, CleanPlayer> = new LRUCache({
max: 10000,
- maxAge: 60 * 20 * 1000,
+ ttl: 60 * 20 * 1000,
})
export const profileCache = new NodeCache({
diff --git a/src/index.ts b/src/index.ts
index fe35009..4464ca7 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -47,7 +47,7 @@ app.get('/', async (req, res) => {
usernameCacheSize: usernameCache.keys().length,
basicProfilesCacheSize: basicProfilesCache.keys().length,
playerCacheSize: playerCache.keys().length,
- basicPlayerCacheSize: basicPlayerCache.keys().length,
+ basicPlayerCacheSize: basicPlayerCache.size,
profileCacheSize: profileCache.keys().length,
profilesCacheSize: profilesCache.keys().length,
profileNameCacheSize: profileNameCache.keys().length,