ソースを参照

Chore: limit HTTP persistent cache entry count

SukkaW 3 週間 前
コミット
e6b5635daf
1 ファイル変更1 行追加0 行削除
  1. 1 0
      Build/lib/fetch-retry.ts

+ 1 - 0
Build/lib/fetch-retry.ts

@@ -121,6 +121,7 @@ const agent = new Agent({ allowH2: false });
     store: new BetterSqlite3CacheStore({
     store: new BetterSqlite3CacheStore({
       loose: true,
       loose: true,
       location: path.join(CACHE_DIR, 'undici-better-sqlite3-cache-store.db'),
       location: path.join(CACHE_DIR, 'undici-better-sqlite3-cache-store.db'),
+      maxCount: 128,
       maxEntrySize: 1024 * 1024 * 100 // 100 MiB
       maxEntrySize: 1024 * 1024 * 100 // 100 MiB
     }),
     }),
     cacheByDefault: 600 // 10 minutes
     cacheByDefault: 600 // 10 minutes