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

Function _deleteInCache

scripts/cache.js:552–567  ·  view source on GitHub ↗
(sha)

Source from the content-addressed store, hash-verified

550var cacheImagesDeleted = [];
551
552async function _deleteInCache(sha)
553{
554 const cachePath = p.join(cacheFolder, sha+'.jpg');
555
556 if(data[sha])
557 delete data[sha];
558
559 if(fs.existsSync(cachePath))
560 {
561 fs.unlinkSync(cachePath);
562
563 cacheImagesDeleted[sha] = cacheImagesDeleted[sha] ? cacheImagesDeleted[sha] + 1 : 1;
564 }
565
566 return;
567}
568
569async function deleteInCache(path)
570{

Callers 1

deleteInCacheFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected