Skip to content

Commit

Permalink
Stop supporting as valid option to 'cache' option
Browse files Browse the repository at this point in the history
  • Loading branch information
cburgmer committed Feb 28, 2015
1 parent 6cab282 commit 4d600ad
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion src/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ var browser = (function (util, proxies, ayepromise, theWindow) {
var lastCacheDate = null;

var getUncachableURL = function (url, cache) {
if (cache === false || cache === 'none' || cache === 'repeated') {
if (cache === 'none' || cache === 'repeated') {
if (lastCacheDate === null || cache !== 'repeated') {
lastCacheDate = Date.now();
}
Expand Down
7 changes: 0 additions & 7 deletions test/specs/BrowserSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -568,13 +568,6 @@ describe("Browser functions", function () {
expect(ajaxRequest.open.calls.mostRecent().args[1]).toMatch(/^non_existing_url.html\?_=[0123456789]+$/);
});

it("should attach an unique parameter to the given URL to circumvent caching if requested (legacy: 'false')", function () {
browser.loadDocument("non_existing_url.html", {cache: false});

expect(ajaxRequest.open).toHaveBeenCalledWith('GET', jasmine.any(String), true);
expect(ajaxRequest.open.calls.mostRecent().args[1]).toMatch(/^non_existing_url.html\?_=[0123456789]+$/);
});

it("should not attach an unique parameter to the given URL by default", function () {
browser.loadDocument("non_existing_url.html", {});

Expand Down

0 comments on commit 4d600ad

Please sign in to comment.