Remove cache busting implementation from AJAX shim

Remove cache busting implementation from AJAX shim

#246 intended to prevent this from happening, but we only tested with jQuery, whose default for this value is true. Our shim for $.ajax defaults to false, so in that context the desired change didn’t take effect. This shim is supposed to be lightweight to address only MessageBus’ requirements, so here we remove support for the now unused cache option entirely, rather than flipping the default.

diff --git a/assets/message-bus-ajax.js b/assets/message-bus-ajax.js
index 5da3c37..e755b7b 100644
--- a/assets/message-bus-ajax.js
+++ b/assets/message-bus-ajax.js
@@ -8,16 +8,11 @@
       throw new Error("MessageBus must be loaded before the ajax adapter");
   }
 
-  var cacheBuster =  Math.random() * 10000 | 0;
-
   global.MessageBus.ajax = function(options){
     var XHRImpl = (global.MessageBus && global.MessageBus.xhrImplementation) || global.XMLHttpRequest;
     var xhr = new XHRImpl();
     xhr.dataType = options.dataType;
     var url = options.url;
-    if (!options.cache){
-      url += ((-1 == url.indexOf('?')) ? '?' : '&') + '_=' + (cacheBuster++)
-    }
     xhr.open('POST', url);
     for (var name in options.headers){
       xhr.setRequestHeader(name, options.headers[name]);

GitHub sha: f9761cf9

This commit appears in #247 which was merged by SamSaffron.