judge: also cache by last-modified

This commit is contained in:
undefined committed 2021-05-08 21:02:42 +08:00
1 parent 19df3852b9
commit df66659c5f
4 files changed
+11 -9

No files matched your search

+2 -2
View File
@@ -196,8 +196,8 @@ export default class Hydro {
const allFiles = new Set<string>();
for (const file of files) {
allFiles.add(file.name);
version[file.name] = file.etag;
if (etags[file.name] !== file.etag) filenames.push(file.name);
version[file.name] = file.etag + file.lastModified;
if (etags[file.name] !== file.etag + file.lastModified) filenames.push(file.name);
}
for (const name in etags) {
if (!allFiles.has(name)) await fs.rm(path.join(filePath, name));