cacheAvatarImageForGithubUser = async function(username, force) {
  for (const [sizeName, entry] of Object.entries(config.packageExtra.avatar)) {
    logger.info(
      { username, width: entry.size, height: entry.size, sizeName },
      "cacheAvatarImageForGithubUser"
    );
    try {
      const query = await PackageExtra.getImageQueryForGithubUser(
        username,
        entry.size
      );
      if (!query) return;

      // check cache
      let imageEntry = await getImage(query);
      if (!force && imageEntry && imageEntry.available) {
        logger.info(
          { username, width: entry.size, height: entry.size, sizeName },
          "cacheAvatarImageForGithubUser cache is available"
        );
        return;
      }

      // add image
      const duration = entry.duration;
      // override default image filename
      const filename = getCachedAvatarImageFilename(username, entry.size);
      await addImage({
        ...query,
        duration,
        filename,
        force,
      });
    } catch (error) {
      logger.error(
        httpErrorInfo(error, { username }),
        "cacheAvatarImageForGithubUser error"
      );
    }
  }
}
Cache the avatar image url for the GitHub user
@param {string} username
@param {Boolean} force