Cooks have been baking “upside down” desserts since cast-iron skillets came along, but they became an American icon with the advent of canned pineapple. Thanks to a slick marketing campaign by the company that would become Dole, golden fruit rings dotted with maraschino cherries became a classic cake combination by the 1920s.

The traditional version calls for layering pineapple and sugar in a cake pan, covering it with batter, then baking. “The fruit gets really jammy and the flavors get concentrated,” says Briana Holt, owner of Portland, Maine’s Tandem Coffee + Bakery.

But Holt, known for incorporating unique flavors and savory ingredients into her sweet pastries, felt something was missing. To her, the cake side of most of these desserts is too sweet and too tender. She wanted one with better structure and flavor, whether it was baked right side up or upside down.

Her winning combination was a uniquely moist, sturdy cake made with a blend of whole-milk ricotta cheese, buttermilk and cornmeal. The ricotta gives the crumb a creamy richness that offers a nice textural contrast to the cornmeal. Holt likens it to an almost cheesecake density. Meanwhile, the tangy buttermilk adds to the cake’s moistness, while its acidity reacts with the baking soda to give the crumb lift and tenderness.

“I love a cornmeal cake for that nubbly, toothsome texture that bakes up well consistently,” Holt says. It’s also sturdy enough to hold up to jammy toppings. Holt frequently bakes the cake without a fruit layer in the pan, instead topping it after baking with whatever is seasonal.

At Milk Street, we loved this combination of flavor and texture. We also added allspice, which paired well with the earthy nuttiness of the cornmeal. Since Holt had provided us with a flavorful, sturdy cake perfect for upside-down baking, we opted to focus on how to marry it to pineapple.

In our early attempts, we stuck with convention by pouring the batter into the cake pan over raw pineapple, then baking. But the liquid in the fruit created an unpleasantly gooey layer of overly moist cake directly above it.

The solution was to cook the pineapple in butter and brown sugar before placing it in the cake pan, then baking it in the oven, deepening its caramelization and cooking off moisture. Because the pineapple was hot when the batter was added, it jump-started the cooking, effectively sealing the batter against any lingering moisture in the fruit.

Finally, the pineapple itself. We found that the classic canned rings lacked flavor and tasted “cooked” directly from the can. They also were cut too thickly to properly cook. Fresh pineapple—including the peeled and cored variety sold in the produce section—was a far better choice. In the end, Holt’s cake baked up tender and bouncy in the middle as the edges crisped. A quick flip and out came a slightly sweet, tender crumb, richly moist with a nutty cornmeal flavor.