tasks/buildHtml.js
function (tplUrl, data) {
      if (urlPrefix) {
        tplUrl = urlPrefix + tplUrl;
      }
      if (urlSuffix) {
        tplUrl += urlSuffix;
      }
      var html = '';
      debug('  retrieve remote content from ' + tplUrl);
      var remoteFragmentKey = getTemplateCacheKeyFromRemoteUrl(tplUrl);
      if (data && !data.cache) {
        html = retrieveFromUrl(tplUrl, remoteFragmentKey, true);
      } else {
        if (!_.has(cache, remoteFragmentKey)) {
          cache[remoteFragmentKey] = retrieveFromUrl(tplUrl, remoteFragmentKey, false);
          debug('  stash content in memory');
        } else {
          debug('  get content from memory');
        }
        html = getTemplateFromCache(remoteFragmentKey);
      }
      return html;
    }
function (tplUrl, data) {
      if (urlPrefix) {
        tplUrl = urlPrefix + tplUrl;
      }
      if (urlSuffix) {
        tplUrl += urlSuffix;
      }
      var html = '';
      debug('  retrieve remote content from ' + tplUrl);
      var remoteFragmentKey = getTemplateCacheKeyFromRemoteUrl(tplUrl);
      if (data && !data.cache) {
        html = retrieveFromUrl(tplUrl, remoteFragmentKey, true);
      } else {
        if (!_.has(cache, remoteFragmentKey)) {
          cache[remoteFragmentKey] = retrieveFromUrl(tplUrl, remoteFragmentKey, false);
          debug('  stash content in memory');
        } else {
          debug('  get content from memory');
        }
        html = getTemplateFromCache(remoteFragmentKey);
      }
      return html;
    }
function ( tplUrl , data ) { if ( urlPrefix ) { tplUrl = urlPrefix + tplUrl ; } if ( urlSuffix ) { tplUrl += urlSuffix ; } var html = '' ; debug ( '  retrieve remote content from ' + tplUrl ) ; var remoteFragmentKey = getTemplateCacheKeyFromRemoteUrl ( tplUrl ) ; if ( data && ! data . cache ) { html = retrieveFromUrl ( tplUrl , remoteFragmentKey , true ) ; } else { if ( ! _ . has ( cache , remoteFragmentKey ) ) { cache [ remoteFragmentKey ] = retrieveFromUrl ( tplUrl , remoteFragmentKey , false ) ; debug ( '  stash content in memory' ) ; } else { debug ( '  get content from memory' ) ; } html = getTemplateFromCache ( remoteFragmentKey ) ; } return html ; }
Retrieve remote content method to be used in HTML files.

@param tplUrl
Remote content URL
@param data
Options
@returns {*} Remote content data
Retrieve remote content method to be used in HTML files .