1. Preheat the oven to 325°F. Grease a 9-inch cake pan.
  2. Sift the flour, baking powder, baking soda, cinnamon and salt into a large bowl. Stir in the grated carrots. In a separate bowl, whisk the brown sugar, oil and eggs and add this to the carrot mixture, stirring until well blended. Stir in the raisins or walnuts (if using) and scrape the batter into the prepared cake pan. Bake the cake for 40 to 50 minutes, until a tester inserted in the centre of the cake comes out clean. Cool the cake for 20 minutes in the pan, then turn out to cool completely.
  3. For the frosting, beat the butter and cream cheese for 3 minutes or until fluffy. Add the icing sugar and vanilla and beat gently until the sugar is incorporated, then beat more vigorously until the icing is fluffy.
  4. Cut the cake in half horizontally and place one cake layer on a platter. Spread a cupful of the frosting over the cake and top with the second cake layer. Spread the remaining frosting on the top and side of the cake. Garnish the edge of the cake with walnut halves, if you wish. Store the cake refrigerated.

The cake will keep for up to 4 days.