Preheat your oven to 350°F and position a rack in the center—this temperature prevents the exterior from setting before the crumb fully bakes through. Grease and lightly flour a 9-inch round or square cake pan; I use parchment paper on the bottom because it eliminates the one moment where a cake can stick despite your best efforts.
Cream the butter and both sugars together for about three minutes until the mixture turns noticeably lighter and develops a sandy texture with tiny air pockets visible. This step matters because you're not just combining ingredients—you're incorporating oxygen that will help the cake rise and stay tender. I usually check this by running my finger through the mixture; if it leaves a trail that doesn't immediately smooth back over, you've hit the right stage.
Add the eggs one at a time, beating for 30 seconds after each addition to emulsify them into the butter properly. I admit I used to rush this part and wondered why my cakes turned slightly grainy; the extra half-minute makes the difference between a silky batter and one that splits slightly during mixing.
Alternate adding the dry ingredients and milk in three additions, starting and ending with dry: flour mixture, then half the milk, then remaining flour mixture, then remaining milk. Stir until just combined—about 20 seconds—because overmixing develops gluten and creates a tougher crumb. This moment is where apple cake crowd fall sharing recipe success hinges; your restraint here determines whether you get tender slices or dense ones.
Toss the diced apples and raisins with one tablespoon of the reserved flour, then fold them gently into the batter using a spatula with about 10 strokes. The flour coating prevents the apples from sinking while distributing their moisture, which is why this step delivers different results than simply stirring apples directly into the batter. Follow with the walnuts, using another five gentle folds.
Pour the batter into the prepared pan and smooth the top with an offset spatula—no need for perfection here. Bake for 38 to 42 minutes, checking with a toothpick inserted near the center around minute 35; you're looking for a few moist crumbs clinging to the pick, not a completely clean insertion.
Cool the cake in its pan for 15 minutes—this resting period allows the structure to set enough that you can turn it out without it breaking apart. Then invert it onto a wire rack to cool completely before slicing or frosting.