Skip to content

Commit

Permalink
fix MemoryCachePlugin with lazy etags
Browse files Browse the repository at this point in the history
  • Loading branch information
vankop committed Apr 20, 2022
1 parent 293e677 commit 674ef1d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 8 additions & 0 deletions lib/cache/MemoryCachePlugin.js
Expand Up @@ -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) => {
Expand Down
3 changes: 0 additions & 3 deletions test/configCases/assets/delete-asset/infrastructure-log.js

This file was deleted.

This file was deleted.

0 comments on commit 674ef1d

Please sign in to comment.