First, make the cake. If you intend to add nuts, toast them in the oven on a sheet pan at 350ºF for about six or seven minutes. Remove them, let them cool slightly and chop them, then scrape the chopped nuts into a bowl and set aside.
Next, top and peel the carrots, then coarsely grate them by hand. Set them aside for now too.
Put the flour, cinnamon, baking soda and salt in a medium bowl. Stir together with a fork.
Preheat the oven to 350ºF. Prepare a 9x13 baking pan by greasing it with butter or oil.
In a large bowl, whisk together the white sugar, brown sugar and oil, then, with a hand mixer, add in the eggs, one at a time, then the vanilla extract. Scrape down any stray bits with a stiff spatula or silicone scraper.
When the mixture is nicely uniform, still using the hand mixer, add in the dry ingredients, working in batches and regularly scraping down the sides of the bowl. When the batter becomes uniform, immediately stir in the grated carrots and the nuts—do this part by hand with a wooden spoon or spatula.
Spoon the batter into the prepared baking pan and slide it into the oven. Set a timer for 35 minutes. The cake is ready when a tester inserted near the center comes out clean and the cake is just starting to pull away from the sides of the pan. This may take anywhere from 35 to 55 minutes, which I know is a weirdly unspecific period of time—the outcome seems to depend on how moist the carrots are. Our cake took about 50 minutes. Remove the cake from the oven and set the pan on a rack. Don't frost it until it's completely cool. At this point, take the cream cheese out of the fridge and let it come to room temperature.
Make the frosting. First, if you need to make your own dulce de leche (instructions in the Kitchen Notes), you can do that a day ahead. To make the frosting, put the cream cheese in a medium bowl and mix it, using a low setting on your hand mixer, until it is soft. If it gets all jammed up in the beaters, turn off the mixer and poke the cheese back into the bowl with a table knife or a slim spatula. Then add in the confectioners sugar and 1/2 teaspoon of salt and beat again on medium to incorporate. Finally, add the dulce de leche and beat again until everything is smooth and uniform. Spread the frosting on the cooled cake. That's it—you’re ready to serve, or cover it up and set it aside for later.