code: function createCacheUrl(domainSuffix, url) {
    const canonicalUrl = new Url(url);
    let pathSegment = _getResourcePath(canonicalUrl.pathname);
    pathSegment += canonicalUrl.protocol === 'https:' ? '/s/' : '/';
  
    return createCurlsSubdomain(canonicalUrl.toString()).then((curlsSubdomain) => {
      const cacheUrl = new Url(url);
      cacheUrl.protocol = 'https';
      const hostname = curlsSubdomain + '.' + domainSuffix;
      cacheUrl.host = hostname;
      cacheUrl.hostname = hostname;
      cacheUrl.pathname = pathSegment + canonicalUrl.hostname + canonicalUrl.pathname;
      return cacheUrl.toString();
    });
  }
docs: Translates the canonicalUrl to the AMP Cache equivalent, for a given AMP Cache.
  Example:
  createCacheUrl('cdn.ampproject.org', 'https://hello-world.com')
  Should resolve: 'https://hello--world-com.cdn.ampproject.org/c/s/hello-world.com'
  
  @param {string} domainSuffix the AMP Cache domain suffix
  @param {string} url the canonical URL
  @return {!Promise<string>} The converted AMP cache URL