2Make cake: Put oven rack in middle position and preheat oven to 350 degrees F.
Special equipment: a well-seasoned 10-inch cast-iron skillet
Optional accompaniment: lightly sweetened whipped cream
Make topping: Melt butter in skillet over moderate heat, then swirl to coat bottom and side of skillet and stir in brown sugar. Simmer, stirring, until sugar is dissolved, 1 to 2 minutes, then sprinkle cranberries and walnuts evenly over butter mixture and remove from heat.
Make cake: Put oven rack in middle position and preheat oven to 350 degrees F.
Whisk together flour, baking powder, baking soda, and salt. Beat together butter and sugar in a large bowl with an electric mixer at high speed until light and fluffy, 4 to 6 minutes. Add eggs, 1 at a time, beating well after each addition. Beat in vanilla. Reduce speed to low and add flour mixture alternately in batches with buttermilk, beginning and ending with flour mixture and mixing until just combined. (Do not overmix.)
Bake cake: Heat topping in skillet over moderately high heat until it starts to bubble, then gently spoon batter over topping and spread evenly. Quickly transfer to oven; bake until cake is golden brown and a wooden skewer comes out clean, 23 to 30 minutes. Cool cake in pan on a rack 15 minutes. Run a thin knife around inside edge of pan, then invert a serving plate over the pan and invert cake onto plate. Cool completely on plate on rack, 1 hour. Serve cake at room temperature.