perf: optimize LRU access in keep-alive (#1316)
This commit is contained in:
parent
0b93440146
commit
1f2926a33c
@ -226,7 +226,7 @@ const KeepAliveImpl = {
|
|||||||
keys.add(key)
|
keys.add(key)
|
||||||
// prune oldest entry
|
// prune oldest entry
|
||||||
if (max && keys.size > parseInt(max as string, 10)) {
|
if (max && keys.size > parseInt(max as string, 10)) {
|
||||||
pruneCacheEntry(Array.from(keys)[0])
|
pruneCacheEntry(keys.values().next().value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// avoid vnode being unmounted
|
// avoid vnode being unmounted
|
||||||
|
Loading…
Reference in New Issue
Block a user