Prep the Pan and Oven: Heat the oven to 350°F (175°C). Grease and line an 8-inch square pan or a 9-inch round pan with parchment.
This helps the cake release cleanly.
Mix Dry Ingredients: In a medium bowl, whisk flour, baking powder, baking soda, and salt. Set aside.
Whisk the Wet Base: In a large bowl, whisk sugar, eggs, and oil until glossy and slightly thick, about 30 seconds. Add sour cream, milk, lime zest, lime juice, tequila (if using), and vanilla.
Whisk until smooth.
Combine: Add dry ingredients to wet. Stir gently with a spatula until just combined. Do not overmix.
The batter should be smooth and slightly thick.
Bake: Pour batter into the pan and smooth the top. Bake 22–28 minutes, or until the center springs back and a toothpick comes out clean with a few moist crumbs.
Make the Syrup: While the cake bakes, stir lime juice, tequila or water, sugar, and a pinch of salt in a small saucepan over low heat until the sugar dissolves. Cool slightly.
Soak the Warm Cake: Let the cake cool in the pan for 10 minutes.
Poke small holes across the surface with a skewer or fork. Brush or spoon the syrup evenly over the cake. It should absorb quickly and add extra moisture and flavor.
Cool Completely: Let the cake cool to room temperature before frosting.
A slightly chilled cake is even easier to frost.
Make the Frosting: Beat cream cheese and butter until smooth and fluffy. Add powdered sugar gradually, then lime juice, zest, salt, and tequila (if using). Beat until creamy and spreadable.
Adjust with more sugar for thickness or a splash of lime juice for a softer texture.
Frost and Garnish: Spread frosting over the cooled cake. Top with extra lime zest, thin lime wheels, or a tiny sprinkle of coarse sugar for sparkle.
Chill Briefly (Optional): Refrigerate for 20–30 minutes to set the frosting before slicing. This helps clean cuts and tidy edges.