Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use full request url as cache key #490

Merged
merged 2 commits into from
Apr 18, 2019
Merged

Conversation

adamkdean
Copy link
Contributor

This patch fixes an issue highlighted in issue #489 whereby the querystring parameters of a URL were not taken into account when constructing a cache key.

@adamkdean adamkdean self-assigned this Apr 18, 2019
@jimlambie jimlambie changed the title fix: use full request url as cache key Use full request url as cache key Apr 18, 2019
Copy link
Contributor

@eduardoboucas eduardoboucas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌮

@@ -189,7 +189,7 @@ Cache.prototype.init = function () {

// we build the filename with a hashed hex string so we can be unique
// and avoid using file system reserved characters in the name
const requestUrl = url.parse(req.url, true).path
const requestUrl = req.url
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only comment would be that requestUrl now becomes a bit redundant (and actually longer in length than just req.url), but I'm not strongly against it.

@adamkdean adamkdean merged commit d41642a into develop Apr 18, 2019
@adamkdean adamkdean deleted the patch/cache-key-full-url branch April 18, 2019 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants