mirror of
https://github.com/SukkaW/Surge.git
synced 2026-03-15 07:26:42 +08:00
Chore: limit HTTP persistent cache entry count
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user