A basic rule in Halacha requires reciting the Beracha of "Bore Mine Mezonot" before eating foods containing flour. So long as the flour is added for the purpose of taste or nourishment and not merely as a binding agent one recites the Beracha of "Mezonot," even if the flour constitutes a small proportion of the food.
When it comes, however, to the "Beracha Aharona" the Beracha of "Al Ha'mihya" recited after eating grain products then the obligation indeed depends on the proportion of flour to other ingredients. If the flour constitutes one-sixth or more of the food product, then one who eats a Ke'zayit of that product must recite "Al Ha'mihya." If, however, the flour constitutes less than this proportion of the food, then one would not recite "Al Ha'mihya" unless he ate a Ke'zayit of flour.
In most grain products such as cake and cookies, flour indeed comprises a majority of the food, and thus one would recite "Al Ha'mihya" after eating a Ke'zayit of the cake or cookies. The exception, however, is a product like cheesecake or pies, in which flour is used only to form a thin crust beneath or surrounding other ingredients. In the case of cheesecake, the cake consists mainly of cheese and has a thin crust below or somewhere in between the cheese. In such a case, one would certainly recite "Mezonot" before eating the cake, but, in most instances, he would not recite "Al Ha'mihya" after eating. Since it is very unlikely that a person would consume a full Ke'zayit of crust in one sitting, he would recite "Bore Nefashot" over the cheese, rather than "Al Ha'mihya."
This would also apply with regard to pies, such as pecan pie, lemon meringue pie or apple pie. In all these cases, one would recite the Beracha of "Mezonot" before partaking of the pie, but very rarely would one recite "Al Ha'mihya" after eating the pie. Since the flour constitutes less than one-sixth of the overall food, the recitation of "Al Ha'mihya" is warranted only if one eats a Ke'zayit of crust, which is very unlikely to occur. Therefore, in most cases, one would recite "Bore Nefashot" over the pecans, lemon meringue or apple filling, instead of reciting "Al Ha'mihya." This is indeed the ruling of Rabbi Moshe Halevi (Israel, 1961-2001), in his work Birkat Hashem (vol. 2, p. 169).
Summary: If one eats a piece of cheesecake or a pie with a thin crust, he recites "Mezonot" before eating and a "Bore Nefashot" after eating. Since flour constitutes a very small proportion of the food, one does not recite "Al Ha'mihya" unless he partakes of a Ke'zayit of crust, which is very unlikely to happen. He therefore recites "Bore Nefashot" over the cheese or pie filling, and recites no Beracha Aharona over the crust.