DEV Community

Discussion on: A simple caching strategy for Node REST APIs, Part 1

Collapse
 
fukamichal profile image
fuka-michal

function getUrlFromRequest(req) {
const url = req.protocol + '://' + req.headers.host + req.originalUrl
return url
}

becasue of req.protocol in key the cache is not effective as can be :)