[mv3] Fix garbage collection-related code

This commit is contained in:
Raymond Hill 2025-12-14 10:26:50 -05:00
parent 621ad89c64
commit 3855c5a648
No known key found for this signature in database
GPG key ID: F5630CAE62A14316

View file

@ -551,7 +551,7 @@ export async function onWakeupRun() {
if ( since < (15 * 60 * 1000) ) { return; } // 15 minutes
const MAX_CACHE_ENTRY_LOW = 256;
const MAX_CACHE_ENTRY_HIGH = MAX_CACHE_ENTRY_LOW +
Math.min(Math.round(MAX_CACHE_ENTRY_LOW + MAX_CACHE_ENTRY_LOW / 8), 1);
Math.max(Math.round(MAX_CACHE_ENTRY_LOW / 8), 8);
const keys = await sessionKeys() || [];
const cacheKeys = keys.filter(a => a.startsWith('cache.css.'));
if ( cacheKeys.length < MAX_CACHE_ENTRY_HIGH ) { return; }