appolo-agent
Advanced tools
Comparing version 6.0.15 to 6.0.16
@@ -16,5 +16,6 @@ "use strict"; | ||
params = params || {}; | ||
let pathsKey = paths.toString(); | ||
let item = null; | ||
if (res) { | ||
item = this._cache.peek(`${res.req.url}${res.req.method}`); | ||
item = this._cache.peek(pathsKey); | ||
} | ||
@@ -25,3 +26,3 @@ if (!item) { | ||
if (res) { | ||
this._cache.set(`${res.req.url}${res.req.method}`, item); | ||
this._cache.set(pathsKey, item); | ||
} | ||
@@ -28,0 +29,0 @@ let result = await this._options.viewEngine(item.path, Object.assign({ cache: this._options.viewCache }, params)); |
@@ -25,12 +25,14 @@ import {Cache} from "appolo-cache"; | ||
let pathsKey = paths.toString(); | ||
let item: { path: string } = null; | ||
if (res) { | ||
item = this._cache.peek(`${res.req.url}${res.req.method}`); | ||
item = this._cache.peek(pathsKey); | ||
} | ||
if (!item) { | ||
item = await this._findPath(paths); | ||
item = await this._findPath(paths); | ||
} | ||
if (res) { | ||
this._cache.set(`${res.req.url}${res.req.method}`, item); | ||
this._cache.set(pathsKey, item); | ||
} | ||
@@ -101,3 +103,3 @@ | ||
try { | ||
let result: fs.Stats = await Q.fromCallback< fs.Stats>(c => fs.stat(path, c)); | ||
let result: fs.Stats = await Q.fromCallback<fs.Stats>(c => fs.stat(path, c)); | ||
return result.isFile(); | ||
@@ -104,0 +106,0 @@ } catch (e) { |
@@ -27,3 +27,3 @@ { | ||
"main": "./index.js", | ||
"version": "6.0.15", | ||
"version": "6.0.16", | ||
"license": "MIT", | ||
@@ -30,0 +30,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
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
1335
80283