cacheable-response
Advanced tools
Comparing version 1.4.0 to 1.4.1
@@ -5,2 +5,7 @@ # Change Log | ||
<a name="1.4.1"></a> | ||
## [1.4.1](https://github.com/Kikobeats/cacheable-response/compare/v1.4.0...v1.4.1) (2019-04-06) | ||
<a name="1.4.0"></a> | ||
@@ -7,0 +12,0 @@ # [1.4.0](https://github.com/Kikobeats/cacheable-response/compare/v1.3.2...v1.4.0) (2019-04-06) |
@@ -64,5 +64,7 @@ 'use strict' | ||
const hasForce = Boolean(req.query ? req.query.force : parse(req.url.split('?')[1]).force) | ||
const url = urlResolve('http://localhost', req.url) | ||
const key = getKey(url) | ||
// Because req.url is relative, we need to convert it into an absolute url | ||
// `u:req.url` is the smallest url length possible | ||
const key = getKey(urlResolve('u:', req.url)) | ||
const cachedData = await cache.get(key) | ||
@@ -69,0 +71,0 @@ const hasData = cachedData !== undefined |
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://nicedoc.io/Kikobeats/cacheable-response", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"main": "index.js", | ||
@@ -8,0 +8,0 @@ "author": { |
20445
80