koa-static-cache
Advanced tools
Comparing version 5.1.3 to 5.1.4
5.1.4 / 2020-08-03 | ||
================== | ||
**fixes** | ||
* [[`2735fab`](http://github.com/koajs/static-cache/commit/2735fab6b9303da8ea941eab66f719440e0f2763)] - fix: remove unused require (dead-horse <<dead_horse@qq.com>>) | ||
* [[`e12d920`](http://github.com/koajs/static-cache/commit/e12d9202e4900f17f7808e505ae39c161615be7f)] - fix: correct the time compare (dead-horse <<dead_horse@qq.com>>) | ||
* [[`c24e6c3`](http://github.com/koajs/static-cache/commit/c24e6c3fe59b896b92a69045deaa0766f6c40836)] - fix: mtime (#93) (Jlin <<565774991@qq.com>>) | ||
5.1.3 / 2020-04-29 | ||
@@ -3,0 +11,0 @@ ================== |
@@ -86,3 +86,3 @@ var crypto = require('crypto') | ||
var stats = await fs.stat(file.path) | ||
if (stats.mtime > file.mtime) { | ||
if (stats.mtime.getTime() !== file.mtime.getTime()) { | ||
file.mtime = stats.mtime | ||
@@ -97,4 +97,3 @@ file.md5 = null | ||
if (ctx.fresh) | ||
return ctx.status = 304 | ||
if (ctx.fresh) return ctx.status = 304 | ||
@@ -106,4 +105,3 @@ ctx.type = file.type | ||
if (ctx.method === 'HEAD') | ||
return | ||
if (ctx.method === 'HEAD') return | ||
@@ -110,0 +108,0 @@ var acceptGzip = ctx.acceptsEncodings('gzip') === 'gzip' |
{ | ||
"name": "koa-static-cache", | ||
"description": "Static cache for koa", | ||
"version": "5.1.3", | ||
"version": "5.1.4", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Jonathan Ong", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17092
181