MCPcopy
hub / github.com/ollm/OpenComic / deleteInCache

Function deleteInCache

scripts/cache.js:569–599  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

567}
568
569async function deleteInCache(path)
570{
571 const sizes = getSizes();
572 const variants = [];
573
574 for(let i = 0, len = sizes.list.length; i < len; i++)
575 {
576 const size = sizes.list[i];
577
578 variants.push({
579 path: path,
580 forceSize: size,
581 });
582
583 variants.push({
584 path: path,
585 type: 'poster',
586 forceSize: size,
587 });
588 }
589
590 for(let i = 0, len = variants.length; i < len; i++)
591 {
592 const variant = variants[i];
593
594 const sha = imageSizeSha(variant);
595 await _deleteInCache(sha);
596 }
597
598 return;
599}
600
601
602function deleteInCacheSha(sha, returnFileSize = false)

Callers

nothing calls this directly

Calls 3

imageSizeShaFunction · 0.85
_deleteInCacheFunction · 0.85
getSizesFunction · 0.70

Tested by

no test coverage detected