docs: function downloadWithCache(url, dir, name) {
    const filePath = path.resolve(dir, name);
    const md5Name = name + '-sha1.txt';
    const mdFile = path.resolve(dir, md5Name);
  
    var downloadAndWriteSha1 = function(url, toBeHashed) {
      logger.info(`start to download: ${url}`);
  
      const result = requestSync('GET', url);
  
      fs.writeFileSync(filePath, result.getBody());
      fs.writeFileSync(mdFile, toBeHashed, {
        encoding: 'utf8',
        flag: 'w'
      });
      logger.info(`download success: ${filePath}`);
      return filePath;
    }
  
    if (_.isExistedFile(mdFile)) {
      const data = fs.readFileSync(mdFile, {
        encoding: 'utf8',
        flag: 'r'
      });
      logger.info(`get ${filePath} from cache`);
      logger.info(`sha:${data.trim()}`);
      return filePath;
    } else {
      const result = crypto.createHash('md5').update(url).digest('hex');
      try {
        return downloadAndWriteSha1(url, result);
      } catch (e) {
        console.log(e);
      }
    }
  }