Heat the oven to 180C/160C fan/gas 4. Butter a 20cm square or 22cm round cake tin. Beat 50g of the butter with the brown sugar, then spread into the base and halfway up the sides of the prepared tin. Cut one of the pineapple rings into quarters, then arrange the whole rings in the tin, putting a cherry in the centre of each. Put a pineapple ring quarter into each corner.
To make the sponge, tip the butter, sugar, flour, desiccated coconut, ½ tsp fine sea salt, most of the lime zest and the eggs into a large bowl. Beat together using an electric whisk until smooth and creamy. Spoon the batter over the pineapple and level with the back of a spoon. Bake for 35-40 mins. Leave to cool in the tin for 5 mins, then turn out onto a cake board or serving plate.
Bring the reserved pineapple syrup to the boil in a medium pan, then stir in the coconut rum (if using), remaining butter and the lime juice. Leave to cool slightly. Drizzle over the cake, then scatter over the coconut flakes and remaining lime zest. Serve with whipped cream or coconut yogurt, if you like. Will keep in an airtight container for up to five days.