01 -
Preheat your oven to 350°F (175°C). Grease and flour two 9-inch round cake pans.
02 -
In a large bowl, whisk together the flour, sugar, baking powder, baking soda, salt, cinnamon, nutmeg, and ginger until well combined.
03 -
Add the vegetable oil and eggs to the dry ingredients, and mix until everything is well blended.
04 -
Stir in the grated carrots, crushed pineapple, vanilla extract, and chopped walnuts (if using) until evenly distributed throughout the batter.
05 -
Divide the batter evenly between the two prepared cake pans, smoothing the tops with a spatula.
06 -
Place in the oven and bake for 30-35 minutes, or until a toothpick inserted into the center comes out clean with just a few crumbs.
07 -
Allow the cakes to cool in the pans for 10 minutes, then turn them out onto a wire rack to cool completely before frosting.
08 -
Once the cakes are completely cooled, frost them with cream cheese frosting and stack the layers.