fix mirroring. fix cache refresh bug
This commit is contained in:
parent
ad3575835b
commit
55baeea6c8
2 changed files with 12 additions and 6 deletions
12
app.js
12
app.js
|
|
@ -780,10 +780,14 @@ function getCachedFile(file, fn) {
|
|||
let smod = lastmod(filePath),
|
||||
cmod = cached.mtime;
|
||||
|
||||
if (!smod) throw "missing source file";
|
||||
if (smod > cmod) cached = null;
|
||||
|
||||
cached.lastcheck = now;
|
||||
if (!smod) {
|
||||
throw "missing source file";
|
||||
}
|
||||
if (smod > cmod) {
|
||||
cached = null;
|
||||
} else {
|
||||
cached.lastcheck = now;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue