Closed jiazhonglin closed 4 years ago
this line ,should modify as ' if (stats.mtime != file.mtime)' ?
looks good to me, can you create a PR to fix this?
looks good to me, can you create a PR to fix this?
https://github.com/koajs/static-cache/pull/93
I commit a new PR, but test can't be passed , because the test didn't consider the case that " file rollback ", in the test file ,file's mtime set a later time , the case "file rollback", should be cover. in consideration of modify the test file ,may confilect to maintainer's mind, so I didn't modify it. can you cover this case in the test file ?
@dead-horse, @jonathanong, @niftylettuce plz close this issue.
HI, I'm using koa-static-cache in my app. my app deploy in the server. when I rollback my app to an old version,my broswer page is broken. I serarch the reason. then I find that when I rollback my app the mtime is ealier than latest one,it cause ctx.length not refresh.
Should file.length refresh whether the mtime old or new?