(headers: HttpHeaders)
| 355 | const UNCACHEABLE_CACHE_CONTROL_DIRECTIVES = new Set(['no-store', 'private', 'no-cache']); |
| 356 | |
| 357 | function hasUncacheableCacheControl(headers: HttpHeaders): boolean { |
| 358 | const cacheControlValues = headers.getAll('cache-control'); |
| 359 | |
| 360 | if (!cacheControlValues) { |
| 361 | return false; |
| 362 | } |
| 363 | |
| 364 | return cacheControlValues.some((cacheControl) => |
| 365 | cacheControl.split(',').some((directive) => { |
| 366 | const directiveName = directive.split('=', 1)[0].trim().toLowerCase(); |
| 367 | return UNCACHEABLE_CACHE_CONTROL_DIRECTIVES.has(directiveName); |
| 368 | }), |
| 369 | ); |
| 370 | } |
| 371 | |
| 372 | function hasSetCookieHeader(headers: HttpHeaders): boolean { |
| 373 | return headers.has('set-cookie'); |
no test coverage detected