Skip to content

Commit

Permalink
fix: remove origin form redis key
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Apr 11, 2019
1 parent 3ef0f1e commit b15375b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ module.exports = ({
const hasForce = Boolean(
req.query ? req.query.force : parse(req.url.split('?')[1]).force
)

// 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 key = getKey(urlResolve('http://localhost', req.url))
const cachedResult = await decompress(await cache.get(key))
const isHit = !hasForce && cachedResult !== undefined

Expand Down

0 comments on commit b15375b

Please sign in to comment.