Skip to content
This repository has been archived by the owner on Feb 29, 2020. It is now read-only.

Commit

Permalink
Merge pull request #563 from k88hudson/gh555
Browse files Browse the repository at this point in the history
fix(addon): #555 Add search to cache key
  • Loading branch information
k88hudson committed Apr 25, 2016
2 parents 61b8a89 + 86a38a3 commit 5b99c82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/PreviewProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ PreviewProvider.prototype = {
_createCacheKey(url) {
url = new URL(url);
let key = url.host.replace(/www\.?/, "");
key = key + url.pathname;
key = key + url.pathname + (url.search || "");
return key.toString();
},

Expand Down
1 change: 1 addition & 0 deletions test/test-PreviewProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ exports.test_dedupe_urls = function*(assert) {
let expectedUrls = [
{"url": "http://foo.com/", "title": "blah"},
{"url": "http://foo.com/bar/foobar", "title": "blah"},
{"url": "https://www.foo.com/?q=param", "title": "blah"},
{"url": "http://localhost-foo.com", "title": "blah"}
];

Expand Down

0 comments on commit 5b99c82

Please sign in to comment.