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

Method loadPersistedHashEntry

web/src/artifact_cache.ts:245–261  ·  view source on GitHub ↗
(
    url: string,
  )

Source from the content-addressed store, hash-verified

243 }
244
245 private async loadPersistedHashEntry(
246 url: string,
247 ): Promise<CrossOriginHashDescriptor | null> {
248 try {
249 if (typeof caches === "undefined") {
250 return null;
251 }
252 const store = await caches.open(COS_HASH_META_CACHE);
253 const response = await store.match(url);
254 if (!response) {
255 return null;
256 }
257 return JSON.parse(await response.text()) as CrossOriginHashDescriptor;
258 } catch {
259 return null;
260 }
261 }
262
263 private async resolveHashDescriptor(
264 url: string,

Callers 1

resolveHashDescriptorMethod · 0.95

Calls 2

parseMethod · 0.80
matchMethod · 0.45

Tested by

no test coverage detected