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

Method responseToStoreType

web/src/artifact_cache.ts:756–771  ·  view source on GitHub ↗
(
    response: Response,
    storetype?: StoreType,
  )

Source from the content-addressed store, hash-verified

754 }
755
756 private async responseToStoreType(
757 response: Response,
758 storetype?: StoreType,
759 ): Promise<any> {
760 if (storetype === undefined) {
761 return response;
762 }
763 const format = storetype.toLowerCase();
764 if (format === "json") {
765 return response.json();
766 }
767 if (format === "arraybuffer") {
768 return response.arrayBuffer();
769 }
770 return response;
771 }
772}
773
774function normalizeCacheType(cacheType?: string): ArtifactCacheType {

Callers 1

fetchWithCacheMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected