mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-21 01:46:28 +08:00
judge: also cache by last-modified
This commit is contained in:
1 parent
19df3852b9
commit
df66659c5f
4 files changed
+11
-9
No files matched your search
@@ -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));
|
||||
|
||||
Reference in new issue
Block a user