diff --git a/lib/cache/MemoryCachePlugin.js b/lib/cache/MemoryCachePlugin.js index cec61acdf65..54e0d27382e 100644 --- a/lib/cache/MemoryCachePlugin.js +++ b/lib/cache/MemoryCachePlugin.js @@ -34,6 +34,14 @@ class MemoryCachePlugin { if (cacheEntry === null) { return null; } else if (cacheEntry !== undefined) { + if (cacheEntry.etag) { + if (etag) { + return cacheEntry.etag.toString() === etag.toString() + ? cacheEntry.data + : null; + } + return null; + } return cacheEntry.etag === etag ? cacheEntry.data : null; } gotHandlers.push((result, callback) => { diff --git a/test/configCases/assets/delete-asset/infrastructure-log.js b/test/configCases/assets/delete-asset/infrastructure-log.js deleted file mode 100644 index 52c3b2b9918..00000000000 --- a/test/configCases/assets/delete-asset/infrastructure-log.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = [ - /^Pack got invalid because of write to: TerserWebpackPlugin|bundle0\.js$/ -]; diff --git a/test/configCases/process-assets/html-plugin/infrastructure-log.js b/test/configCases/process-assets/html-plugin/infrastructure-log.js deleted file mode 100644 index 7d9f5b745c0..00000000000 --- a/test/configCases/process-assets/html-plugin/infrastructure-log.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = [ - /^Pack got invalid because of write to: RealContentHashPlugin|analyse|index\.html$/ -];