function cacheIcon(id) {

    return function updateCache(icon) {
      iconCache[id] = isIcon(icon) ? icon : new Icon(icon, config[id]);

      return transformClone(iconCache[id]);
    };
  }
Prepare and cache the loaded icon for the specified `id`.
@param {string} id icon cache id
@returns {function(*=): *}