Preheat oven to 350°.
Sift together flour, spices, and baking soda and set aside.
Line the bottoms of three 9-inch round cake pans with parchment paper and lightly grease.
In a bowl, beat sugar, oil, and vanilla together at medium speed. Add eggs, one at a time.
Slow down the mixer to lowest speed and add flour mixture a little at a time.
Fold in carrots, crushed pineapple, raisins, and walnuts.
Pour batter evenly into cake pans.
Bake for 35–40 minutes or until a toothpick inserted in the center comes out clean.
Cool cake layers in pans for 10 minutes, then flip cakes onto cooling racks to cool completely.