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

Method fetchWithCache

web/src/artifact_cache.ts:615–623  ·  view source on GitHub ↗
(
    url: string,
    storetype?: string,
    signal?: AbortSignal,
  )

Source from the content-addressed store, hash-verified

613 }
614
615 async fetchWithCache(
616 url: string,
617 storetype?: string,
618 signal?: AbortSignal,
619 ): Promise<any> {
620 // TODO: Avoid duplicate OPFS record validation by trying cache reads first
621 await this.addToCache(url, storetype, signal);
622 return this.readFromCache(url, storetype);
623 }
624
625 private async readFromCache(url: string, storetype?: string): Promise<any> {
626 if (storetype?.toLowerCase() === "arraybuffer") {

Callers

nothing calls this directly

Calls 2

addToCacheMethod · 0.95
readFromCacheMethod · 0.95

Tested by

no test coverage detected