MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / evictOverflowEntries

Function evictOverflowEntries

packages/node/src/image.ts:17–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15}
16
17function evictOverflowEntries(): void {
18 while (IMAGE_CACHE.size > imageCacheMaxEntries) {
19 const oldest = IMAGE_CACHE.keys().next();
20 if (oldest.done) return;
21 IMAGE_CACHE.delete(oldest.value);
22 }
23}
24
25export function setImageCacheMaxEntries(maxEntries: number): void {
26 imageCacheMaxEntries = normalizeCacheMaxEntries(maxEntries);

Callers 2

setImageCacheMaxEntriesFunction · 0.85
loadImageFunction · 0.85

Calls 2

keysMethod · 0.65
deleteMethod · 0.45

Tested by

no test coverage detected