(headers: HttpHeaders)
| 327 | const UNCACHEABLE_CACHE_CONTROL_DIRECTIVES = new Set(['no-store', 'private', 'no-cache']); |
| 328 | |
| 329 | function 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 | |
| 343 | function hasSetCookieHeader(headers: HttpHeaders): boolean { |
| 344 | return headers.has('set-cookie'); |
no test coverage detected
searching dependent graphs…