01 -
Preheat oven to 350°F (175°C). Grease and flour two 9-inch round cake pans.
02 -
Whisk together flour, sugar, baking powder, baking soda, salt, cinnamon, nutmeg, and ginger in a large bowl.
03 -
Add vegetable oil and eggs to dry ingredients and mix until fully incorporated.
04 -
Stir in grated carrots, crushed pineapple, vanilla extract, and walnuts if using.
05 -
Distribute batter evenly between prepared pans. Bake for 30 to 35 minutes or until a toothpick inserted in the center comes out clean.
06 -
Cool cakes in pans for 10 minutes, then transfer to wire racks to cool completely.
07 -
Once fully cooled, frost the cakes with cream cheese frosting.