01 -
Preheat oven to 175°C. Grease and flour two 20-centimeter round cake pans or line with parchment paper.
02 -
In a medium bowl, whisk together all-purpose flour, ground pistachios, baking powder, baking soda, and salt until well incorporated.
03 -
In a large bowl, beat softened butter and granulated sugar until pale and fluffy, about 3 to 5 minutes.
04 -
Add the eggs one at a time, mixing well after each addition. Stir in vanilla extract and almond extract if using.
05 -
Alternately add dry ingredients and buttermilk to the butter mixture, beginning and ending with the dry mixture. Mix just until combined; do not overmix.
06 -
Divide batter evenly between prepared pans. Bake for 25–30 minutes, or until a toothpick inserted into the center emerges clean. Let cakes cool in pans for 10 minutes, then transfer to wire racks to cool completely.
07 -
In a small saucepan over medium heat, combine raspberries, granulated sugar, lemon juice, cornstarch, and water. Stir constantly and cook until thickened to a jam-like consistency, about 5 to 7 minutes. Remove from heat and cool fully.
08 -
In a large bowl, beat cream cheese and softened butter together until smooth and creamy, about 3 minutes. Gradually add powdered sugar, one cup at a time, beating until frosting is light and fluffy. Mix in vanilla extract and a pinch of salt until well blended.
09 -
Place one cake layer on a serving plate. Spread an even layer of cooled raspberry filling over the top. Top with the second cake layer, pressing down gently to secure.
10 -
Evenly coat the cake with cream cheese frosting, smoothing over top and sides. If desired, decorate with chopped pistachios and fresh raspberries for a polished finish.