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

Method persistHashEntry

web/src/artifact_cache.ts:230–243  ·  view source on GitHub ↗
(
    url: string,
    hash: CrossOriginHashDescriptor,
  )

Source from the content-addressed store, hash-verified

228 }
229
230 private async persistHashEntry(
231 url: string,
232 hash: CrossOriginHashDescriptor,
233 ): Promise<void> {
234 try {
235 if (typeof caches === "undefined") {
236 return;
237 }
238 const store = await caches.open(COS_HASH_META_CACHE);
239 await store.put(url, new Response(JSON.stringify(hash)));
240 } catch {
241 // best-effort: ignore storage errors
242 }
243 }
244
245 private async loadPersistedHashEntry(
246 url: string,

Callers 2

putMethod · 0.95
resolveHashDescriptorMethod · 0.95

Calls 1

putMethod · 0.45

Tested by

no test coverage detected