tasks/cache_control.js
function (html) {
    var count = 0;
    page = html.replace(/<link(.*?)\/?>/g,function (match) {
      if (match.indexOf("stylesheet") > -1) {
        return match.replace(/href="([^"]*")/, function (ref) {
          // Ignore CDN References
          if (options.ignoreCDN) {
            // remove src= from the match so all that is left is the quotes and string
            partial = ref.slice(4);
            if (partial.slice(1,3) === "//" || partial.slice(1,5) === "http"){
              return ref;
            }
          }
          // Grab files from Ignore List
          if (options.filesToIgnore.length > 0) {
            partial = ref.slice(5, ref.length - 1);
            if (options.filesToIgnore.indexOf(partial) > -1) {
              return ref;
            }
          }
          if(shouldIgnorePattern(ref.slice(6, ref.length - 1))){
            return ref;
          }
          count++; // Track how many files are changed
          if (ref.indexOf("?v=") > -1) {
            return ref.replace(/v=(.*)/,'v=' + options.version + '"');
          } else {
            return ref.slice(0, ref.length - 1) + '?v=' + options.version + '"';
          }
        });
      } else {
        return match;
      }
    });
    return count;
  }
function (html) {
    var count = 0;
    page = html.replace(/<link(.*?)\/?>/g,function (match) {
      if (match.indexOf("stylesheet") > -1) {
        return match.replace(/href="([^"]*")/, function (ref) {
          // Ignore CDN References
          if (options.ignoreCDN) {
            // remove src= from the match so all that is left is the quotes and string
            partial = ref.slice(4);
            if (partial.slice(1,3) === "//" || partial.slice(1,5) === "http"){
              return ref;
            }
          }
          // Grab files from Ignore List
          if (options.filesToIgnore.length > 0) {
            partial = ref.slice(5, ref.length - 1);
            if (options.filesToIgnore.indexOf(partial) > -1) {
              return ref;
            }
          }
          if(shouldIgnorePattern(ref.slice(6, ref.length - 1))){
            return ref;
          }
          count++; // Track how many files are changed
          if (ref.indexOf("?v=") > -1) {
            return ref.replace(/v=(.*)/,'v=' + options.version + '"');
          } else {
            return ref.slice(0, ref.length - 1) + '?v=' + options.version + '"';
          }
        });
      } else {
        return match;
      }
    });
    return count;
  }
html content, ignoreHttp currently always true, ignore src if begins with http or //