Ingredients
Method
- Heat your oven to 350°F (175°C) and place a rack in the center. Grease the 9×13-inch pan and line it with parchment, leaving an overhang on the long sides so you can lift the cake out later.
- Wash the zucchini and trim the ends. You don't need to peel it, because the thin green skin disappears into the cake. Grate it on the large holes of a box grater. Place the shreds in a clean towel and give them one firm squeeze, just enough that a few drops come out. You are not wringing it dry.
- In a medium bowl, whisk the flour, cinnamon, nutmeg, baking soda, baking powder, and salt. Whisking spreads the leavening evenly, which prevents bitter pockets of baking soda.
- In a large bowl, whisk the eggs with both sugars until slightly thickened, about 1 minute. Whisk in the oil, sour cream, and vanilla until smooth and glossy.
- Add the dry ingredients to the wet in two additions. Fold gently with a spatula until just combined, with no dry streaks. Fold in the grated zucchini and the nuts, if using. The batter will be thick but spreadable.
- Spread the batter evenly into the pan and bake for 32 to 38 minutes. The cake is done when a toothpick inserted in the center comes out with a few moist crumbs, and the top springs back when lightly pressed.
- Cool the cake in the pan on a wire rack for at least 1 hour. This step matters. Frosting a warm cake melts the cream cheese and leaves you with a greasy, sliding mess.
- Beat the softened cream cheese and butter on medium speed for 2 minutes, until completely smooth and lump-free. Add the powdered sugar one cup at a time on low speed, then add the vanilla and salt. Beat on medium-high for 1 to 2 minutes until fluffy. Add a teaspoon of lemon juice if you want more tang.
- Spread the frosting over the cooled cake with an offset spatula. Sprinkle with toasted walnuts or a dusting of cinnamon. For the cleanest slices, chill the frosted cake for 30 minutes, then cut with a warm, wiped knife.
Notes
Cool the cake in the pan on a wire rack for about 1 hour before frosting. Refrigerate the frosted cake, covered, for up to 5 days.
