Limit cache read parallelism #3747
| @@ -103,7 +103,13 @@ class DiskCache { | ||
| 103 | 103 | return this.#instance; |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | this.#instance = storage.create({ dir: this.cachePath, ttl: false, forgiveParseErrors: true }); |
| 107 | + dir: this.cachePath, | |
| 108 | + ttl: false, | |
| 109 | + forgiveParseErrors: true, | |
| 110 | + // @ts-ignore | |
| 111 | + maxFileDescriptors: 100, | |
| 112 | + }); | |
| 107 | 113 | await this.#instance.init(); |
| 108 | 114 | this.#syncInterval = setInterval(this.#syncCacheEntries.bind(this), DiskCache.SYNC_INTERVAL); |
| 109 | 115 | return this.#instance; |