diff --git a/lib/interceptor/cache.js b/lib/interceptor/cache.js index a2f235b8db3..6565baf0a51 100644 --- a/lib/interceptor/cache.js +++ b/lib/interceptor/cache.js @@ -6,7 +6,7 @@ const util = require('../core/util') const CacheHandler = require('../handler/cache-handler') const MemoryCacheStore = require('../cache/memory-cache-store') const CacheRevalidationHandler = require('../handler/cache-revalidation-handler') -const { assertCacheStore, assertCacheMethods, makeCacheKey, normaliseHeaders, parseCacheControlHeader } = require('../util/cache.js') +const { assertCacheStore, assertCacheMethods, makeCacheKey, normalizeHeaders, parseCacheControlHeader } = require('../util/cache.js') const { AbortError } = require('../core/errors.js') /** @@ -326,7 +326,7 @@ module.exports = (opts = {}) => { opts = { ...opts, - headers: normaliseHeaders(opts) + headers: normalizeHeaders(opts) } const reqCacheControl = opts.headers?.['cache-control'] diff --git a/lib/util/cache.js b/lib/util/cache.js index 53851df1d1b..d79c7f729e7 100644 --- a/lib/util/cache.js +++ b/lib/util/cache.js @@ -34,7 +34,7 @@ function makeCacheKey (opts) { * @param {Record} * @returns {Record} */ -function normaliseHeaders (opts) { +function normalizeHeaders (opts) { let headers if (opts.headers == null) { headers = {} @@ -367,7 +367,7 @@ function assertCacheMethods (methods, name = 'CacheMethods') { module.exports = { makeCacheKey, - normaliseHeaders, + normalizeHeaders, assertCacheKey, assertCacheValue, parseCacheControlHeader,