From be7750d6fd056d7451c36f602b8ce7cdde94cfbe Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Mon, 24 Mar 2025 02:21:48 +0200 Subject: [PATCH] Limit cache read parallelism #3747 --- src/endpoints/characters.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/endpoints/characters.js b/src/endpoints/characters.js index 8ed14eb7f..85bb64c33 100644 --- a/src/endpoints/characters.js +++ b/src/endpoints/characters.js @@ -103,7 +103,13 @@ class DiskCache { return this.#instance; } - this.#instance = storage.create({ dir: this.cachePath, ttl: false, forgiveParseErrors: true }); + this.#instance = storage.create({ + dir: this.cachePath, + ttl: false, + forgiveParseErrors: true, + // @ts-ignore + maxFileDescriptors: 100, + }); await this.#instance.init(); this.#syncInterval = setInterval(this.#syncCacheEntries.bind(this), DiskCache.SYNC_INTERVAL); return this.#instance;