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

Method addToCache

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

Source from the content-addressed store, hash-verified

375 }
376
377 async addToCache(url: string, storetype?: string, signal?: AbortSignal) {
378 const request = new Request(url, signal ? { signal } : undefined);
379 if (this.cache === undefined) {
380 this.cache = await caches.open(this.scope);
381 }
382 const result = await this.cache.match(request);
383 if (result === undefined) {
384 await this.cache.add(request);
385 }
386 }
387
388 /**
389 * Determine if all keys exist in the cache

Callers 1

fetchWithCacheMethod · 0.95

Calls 2

matchMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected