Skip to content

Commit

Permalink
feat: add response to getKey attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
whooehoo committed Sep 4, 2019
1 parent f977b70 commit da25929
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ module.exports = ({
const hasForce = Boolean(
req.query ? req.query.force : parse(req.url.split('?')[1]).force
)
const key = getKey(req)
const key = getKey(req, res)
const cachedResult = await decompress(await cache.get(key))
const isHit = !hasForce && cachedResult !== undefined
const result = isHit ? cachedResult : await get({ req, res, ...opts })
Expand Down

0 comments on commit da25929

Please sign in to comment.