mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
[mv3] Fix garbage collection-related code
This commit is contained in:
parent
621ad89c64
commit
3855c5a648
1 changed files with 1 additions and 1 deletions
|
|
@ -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; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue