* @param {import('../../types/cache-interceptor.d.ts').default.CacheOptions['type']} cacheType * @param {import('../../types/header.d.ts').IncomingHttpHeaders} resHeaders * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} cacheControlDirectives * @returns {bool
(cacheType, resHeaders, cacheControlDirectives)
| 489 | * @returns {boolean} |
| 490 | */ |
| 491 | function revalidationResponseDisallowsCachedReuse (cacheType, resHeaders, cacheControlDirectives) { |
| 492 | return cacheControlDirectives['no-store'] === true || |
| 493 | (cacheType === 'shared' && ( |
| 494 | cacheControlDirectives.private === true || |
| 495 | Object.hasOwn(resHeaders, 'set-cookie') |
| 496 | )) || |
| 497 | (resHeaders.vary ? isInvalidOrWildcardVaryHeader(resHeaders.vary) : false) |
| 498 | } |
| 499 | |
| 500 | /** |
| 501 | * @see https://www.rfc-editor.org/rfc/rfc9111.html#name-storing-responses-to-authen |
no test coverage detected