Grease a 9x13 inch baking dish or 8-inch round cake pan with oil or cooking spray, making sure to coat the bottom and sides evenly. Preheat your oven to 340°F, allowing at least 15 minutes for it to reach temperature. This ensures even baking and prevents the cake from browning too quickly on the edges.
Sift together the flour, baking soda, baking powder, salt, cinnamon, nutmeg, and ground ginger into a large bowl. Sifting aerates the flour and ensures the leavening agents are evenly distributed throughout, which is crucial for a tender, evenly-risen cake. Set this dry mixture aside.
In a separate bowl, combine the milk and vinegar and let sit for 1-2 minutes to create a buttermilk substitute—this adds subtle tang and helps activate the leavening agents. While that's resting, finely grate the carrots using a box grater or food processor, then measure out 3/4 cup. Once the milk mixture is ready, add the oil, sugar, vanilla essence, and orange zest to it, stirring well until the sugar dissolves completely. I find orange zest adds a brightness that complements the spices beautifully.
Pour the wet ingredient mixture from Step 3 into the dry ingredients from Step 2, stirring gently with a spatula until just combined—the batter should be smooth but don't overmix, as this can develop gluten and make the cake tough. Fold in the grated carrots until evenly distributed. The batter should come together quickly; if it seems dry, add an extra tablespoon of milk.
Pour the batter into the prepared pan from Step 1, smoothing the top with a spatula. Bake in the preheated 340°F oven for 28-30 minutes, until a toothpick inserted into the center comes out clean or with just a few moist crumbs. The cake should be golden brown on top. Remove from the oven and let cool in the pan for 10 minutes, then turn out onto a wire cooling rack to cool completely—this usually takes about 1 hour.
While the cake cools, prepare the frosting by combining the softened butter and cream cheese in a bowl. Beat together with an electric mixer on medium speed until light and fluffy, about 2 minutes. Add the sugar and vanilla essence, continuing to beat until the mixture is smooth and spreadable—I prefer Philadelphia cream cheese because it has a tangy flavor that cuts through the sweetness of the cake beautifully.
Once the cake has cooled completely, spread the frosting evenly over the top using a spatula or offset knife. Sprinkle the chopped walnuts or pecans over the frosting, pressing them gently so they adhere. Slice and serve immediately, or refrigerate for up to 2 days—the cake actually tastes even better the next day as the flavors meld.