header_cache_t *nntp_hcache_open(struct NntpData *nntp_data)
{
  struct Url url;
  char file[PATH_MAX];

  if (!nntp_data->nserv || !nntp_data->nserv->cacheable ||
      !nntp_data->nserv->conn || !nntp_data->group ||
      !(nntp_data->newsrc_ent || nntp_data->subscribed || SaveUnsubscribed))
  {
    return NULL;
  }

  mutt_account_tourl(&nntp_data->nserv->conn->account, &url);
  url.path = nntp_data->group;
  url_tostring(&url, file, sizeof(file), U_PATH);
  return mutt_hcache_open(NewsCacheDir, file, nntp_hcache_namer);
}
header_cache_t *nntp_hcache_open(struct NntpData *nntp_data)
{
  struct Url url;
  char file[PATH_MAX];

  if (!nntp_data->nserv || !nntp_data->nserv->cacheable ||
      !nntp_data->nserv->conn || !nntp_data->group ||
      !(nntp_data->newsrc_ent || nntp_data->subscribed || SaveUnsubscribed))
  {
    return NULL;
  }

  mutt_account_tourl(&nntp_data->nserv->conn->account, &url);
  url.path = nntp_data->group;
  url_tostring(&url, file, sizeof(file), U_PATH);
  return mutt_hcache_open(NewsCacheDir, file, nntp_hcache_namer);
}