I have studied the research links provided, and it seems to me that it shows that saliva histatins kill yeast cells, and in the process of killing them, magnesium is expelled from the yeast cells. I fail to see how this is evidence of magnesium killing or inhibiting yeast growth.
Many caprylic acid products are composed of combination of zinc, sodium, calcium and magnesium caprylate. I guess the vendors attempt to balance these minerals while delivering the active ingredient Caprylic acid. In this caprylate form, it survives the digestion process and can reach the colon. However I could find no research showing that this method of delivering caprylic acid is effective in fighting candida. Even if it is effective, it is obviously the caprylic acid that is the active ingredient.