MCPcopy
hub / github.com/angular/angular / cachedResourceResolve

Function cachedResourceResolve

packages/core/src/metadata/resource_loading.ts:59–69  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

57
58 // Helper to dedupe resource fetches
59 function cachedResourceResolve(url: string): Promise<string> {
60 const promiseCached = urlCache.get(url);
61 if (promiseCached) {
62 return promiseCached;
63 }
64
65 const promise = resourceResolver(url).then((response) => unwrapResponse(url, response));
66 urlCache.set(url, promise);
67
68 return promise;
69 }
70
71 const resolutionPromises = Array.from(currentQueue).map(async ([type, component]) => {
72 if (component.styleUrl && component.styleUrls?.length) {

Callers 1

Calls 4

unwrapResponseFunction · 0.85
getMethod · 0.65
thenMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…