whereEndoCache = (platform, env, info) => {
  if (env.XDG_CACHE_HOME !== undefined) {
    return `${env.XDG_CACHE_HOME}/endo`;
  } else if (platform === 'win32') {
    return `${whereHomeWindows(env, info)}\\Endo`;
  } else if (platform === 'darwin') {
    const home = env.HOME !== undefined ? env.HOME : info.home;
    return `${home}/Library/Caches/Endo`;
  }
  const home = env.HOME !== undefined ? env.HOME : info.home;
  return `${home}/.cache/endo`;
}
Returns the most suitable path for Endo caches.

@type {typeof import('./types.js').whereEndoCache}