From 3f70cde4ca16b0c4b848a4465fb62ac30cc8f7a8 Mon Sep 17 00:00:00 2001 From: Patrick Hulce Date: Fri, 8 Feb 2019 11:20:05 -0600 Subject: [PATCH] core(cache-headers): fix typo in must-revalidate --- lighthouse-core/audits/byte-efficiency/uses-long-cache-ttl.js | 2 +- .../test/audits/byte-efficiency/uses-long-cache-ttl-test.js | 2 +- types/parse-cache-control/index.d.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lighthouse-core/audits/byte-efficiency/uses-long-cache-ttl.js b/lighthouse-core/audits/byte-efficiency/uses-long-cache-ttl.js index 2ce5f806e5b6..d866ca6d8a38 100644 --- a/lighthouse-core/audits/byte-efficiency/uses-long-cache-ttl.js +++ b/lighthouse-core/audits/byte-efficiency/uses-long-cache-ttl.js @@ -175,7 +175,7 @@ class CacheHeaders extends Audit { // Ignore assets where policy implies they should not be cached long periods if (cacheControl && ( - cacheControl['must-validate'] || + cacheControl['must-revalidate'] || cacheControl['no-cache'] || cacheControl['no-store'] || cacheControl['private'])) { diff --git a/lighthouse-core/test/audits/byte-efficiency/uses-long-cache-ttl-test.js b/lighthouse-core/test/audits/byte-efficiency/uses-long-cache-ttl-test.js index a4fa6ac43708..aba0f68d014c 100644 --- a/lighthouse-core/test/audits/byte-efficiency/uses-long-cache-ttl-test.js +++ b/lighthouse-core/test/audits/byte-efficiency/uses-long-cache-ttl-test.js @@ -190,7 +190,7 @@ describe('Cache headers audit', () => { it('ignores assets where policy implies they should not be cached long periods', () => { const networkRecords = [ - networkRecord({headers: {'cache-control': 'must-validate'}}), + networkRecord({headers: {'cache-control': 'must-revalidate'}}), networkRecord({headers: {'cache-control': 'no-cache'}}), networkRecord({headers: {'cache-control': 'private'}}), ]; diff --git a/types/parse-cache-control/index.d.ts b/types/parse-cache-control/index.d.ts index e78a485b6b14..5e8059fb5d15 100644 --- a/types/parse-cache-control/index.d.ts +++ b/types/parse-cache-control/index.d.ts @@ -8,7 +8,7 @@ declare module 'parse-cache-control' { // Follows the potential settings of cache-control, see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control interface CacheHeaders { 'max-age'?: number; - 'must-validate'?: boolean; + 'must-revalidate'?: boolean; 'no-cache'?: boolean; 'no-store'?: boolean; 'private'?: boolean;