MCPcopy Index your code
hub / github.com/angular/angular / hasUncacheableCacheControl

Function hasUncacheableCacheControl

packages/common/http/src/transfer_cache.ts:329–341  ·  view source on GitHub ↗
(headers: HttpHeaders)

Source from the content-addressed store, hash-verified

327const UNCACHEABLE_CACHE_CONTROL_DIRECTIVES = new Set(['no-store', 'private', 'no-cache']);
328
329function hasUncacheableCacheControl(headers: HttpHeaders): boolean {
330 const cacheControl = headers.get('cache-control');
331
332 if (!cacheControl) {
333 return false;
334 }
335
336 return cacheControl.split(',').some((directive) => {
337 const directiveName = directive.split('=', 1)[0].trim().toLowerCase();
338
339 return UNCACHEABLE_CACHE_CONTROL_DIRECTIVES.has(directiveName);
340 });
341}
342
343function hasSetCookieHeader(headers: HttpHeaders): boolean {
344 return headers.has('set-cookie');

Callers 2

canUseOrCacheRequestFunction · 0.85

Calls 3

someMethod · 0.80
getMethod · 0.65
hasMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…