浏览代码

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({
       loose: true,
       location: path.join(CACHE_DIR, 'undici-better-sqlite3-cache-store.db'),
+      maxCount: 128,
       maxEntrySize: 1024 * 1024 * 100 // 100 MiB
     }),
     cacheByDefault: 600 // 10 minutes