MCPcopy Create free account
hub / github.com/apache/tvm / deleteInCache

Method deleteInCache

web/src/artifact_cache.ts:584–598  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

582 }
583
584 async deleteInCache(url: string) {
585 await this.initDB(); // Make sure the DB is initialized
586 const transaction = this.db?.transaction(['urls'], 'readwrite');
587 if (transaction === undefined) {
588 return;
589 }
590 const store = transaction.objectStore('urls');
591 const request = store.delete(url);
592 // Await completion of the delete request
593 await new Promise<void>((resolve, reject) => {
594 request.onsuccess = () => resolve();
595 request.onerror = () => reject(request.error);
596 });
597 return;
598 }
599}
600
601/**

Callers 1

fetchWithCacheMethod · 0.95

Calls 3

initDBMethod · 0.95
rejectFunction · 0.85
deleteMethod · 0.45

Tested by

no test coverage detected