Halacha requires reciting the Beracha Aharona of "Al Ha'mihya" after eating a Ke'zayit of grain foods. The question arises, however, as to whether this rule refers to a Ke'zayit of flour, or a Ke'zayit overall. cake and cookies, for example, consist of much more than just flour; they include eggs, sugar, shortening and other ingredients. Does the obligation of "Al Ha'mihya" take effect whenever one partakes of a Ke'zayit of cake, regardless of the proportion of grain to other ingredients, or does this obligation apply only if one eats a Ke'zayit of flour?
This issue is subject to debate among the Halachic authorities. The work Zera Avraham maintains that one recites "Al Ha'mihya" only if he partakes of a Ke'zayit of flour within the period of "Kede Achilat Pares," or approximately 7 minutes. Thus, if a person ate a large piece of cake but which consists of only a small proportion of flour, he will likely not be required to recite "Al Ha'mihya" according to this view, since in all likelihood he has not eaten a "Ke'zayit" of flour within seven minutes of eating. The Kaf Ha'haim (work of Halacha by Rabbi Yaakov Sofer, 1870-1939), in Siman 208 (53), cites this position in the name of the Gaon of Vilna (Rabbi Eliyahu of Vilna, 1720-1797).
On the opposite extreme, the Peri Hadash (commentary to the Shulhan Aruch by Rabbi Hizkiya Da Silva, 1659-1698) held that once a food contains flour, the consumption of a Ke'zayit of that food requires the recitation of "Al Ha'mihya." Regardless of the proportion of flour to other ingredients, if a food contains flour it is viewed in its entirety as a grain product with respect to Berachot. Hence, partaking of a Ke'zayit of this food within seven minutes obligates one to recite "Al Ha'mihya" irrespective of the amount of flour consumed during this period.
In the middle of these two extremes we find a third position, that of the "Ginat Veradim," who claimed that the Halacha in such a case depends on the proportion comprised by the flour. If the flour constitutes one-sixth or more of the given product, then the entire item has the status of a grain food and the consumption of a Ke'zayit requires the recitation of "Al Ha'mihya." If, however, the flour comprises less than this proportion of the food item, then one recites "Al Ha'mihya" only if he partakes of a Ke'zayit of flour within the period of "Kede Achilat Pares."
As for the final Halacha, a number of leading authorities follow the ruling of the "Ginat Veradim," whereby this issue depends on whether or not the flour constitutes at least one-sixth of the food. This is the ruling of Hacham Ben Sion Abba Shaul (Israel, 1924-1998), in his work Or Le'sion (vol. 2, p. 169), as well as of Rabbi Moshe Halevi (Israel, 1961-2001), in his work Birkat Hashem (vol. 2, p. 166). Hacham Ovadia Yosef likewise adopts this position in his work Hazon Ovadia (Laws of Berachot, p. 190; listen to audio recording for precise citation).
Summary: If one eats a piece of cake, the amount he must eat to require the recitation of "Al Ha'mihya" depends on its composition. If flour comprises one-sixth or more of the cake, then one recites "Al Ha'mihya" anytime he eats a Ke'zayit of this cake within seven minutes. If flour comprises less than this proportion, then it requires "Al Ha'mihya" only if one partakes of enough cake that he has eaten a Ke'zayit of flour within seven minutes.