01 - Preheat oven to 350°F. Grease and line a 9x13-inch pan or two 8-inch round pans with parchment paper.
02 - Whisk together flour, baking powder, baking soda, salt, cinnamon, nutmeg, ginger, and cloves in a large bowl.
03 - Beat eggs, granulated sugar, and brown sugar until thick and pale. Incorporate vegetable oil, applesauce, and vanilla until smooth.
04 - Gradually fold dry ingredients into wet mixture until just combined.
05 - Fold in grated carrots, chopped walnuts, and raisins if using.
06 - Transfer batter to prepared pan(s), smooth surface, and bake 40 to 45 minutes until a toothpick inserted in the center comes out clean.
07 - Allow cake to cool in the pan for 15 minutes, then transfer to a wire rack and cool completely.
08 - Beat softened cream cheese and butter until creamy. Add powdered sugar, vanilla, and salt; beat until smooth.
09 - Spread cream cheese frosting evenly over cooled cake. For layered cakes, apply frosting between layers and on top.
10 - Optionally, sprinkle additional chopped walnuts atop the frosted cake for decoration.