While some people believe certain foods or diets promote the growth of yeast and lead to recurrent infections, there's not enough research to support that theory.
According to the studies that have been done, a strict diet doesn't seem to be helpful in terms of preventing them.