/* Returns: a short description of the content type @type. Free the returned string with g_free()  */
gchar* g_content_type_get_description(const gchar *type)
/* Returns: a short description of the content type @type. Free the returned string with g_free()  */
gchar* g_content_type_get_description(const gchar *type)
{
  static GHashTable *type_comment_cache = NULL;
  gchar *comment;
  g_return_val_if_fail (type != NULL, NULL);
  G_LOCK (gio_xdgmime);
  type = xdg_mime_unalias_mime_type (type);
  if (type_comment_cache == NULL)
    type_comment_cache = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
  comment = g_hash_table_lookup (type_comment_cache, type);
  comment = g_strdup (comment);
  G_UNLOCK (gio_xdgmime);
  if (comment != NULL)
    return comment;
  comment = load_comment_for_mime (type);
  G_LOCK (gio_xdgmime);
  g_hash_table_insert (type_comment_cache,
                       g_strdup (type),
                       g_strdup (comment));
  G_UNLOCK (gio_xdgmime);
  return comment;
}