Preheat the oven to 180°C (350°F) or 160°C (315°F) fan forced.
Add 75 g (2½ oz) of the butter to a saucepan with the brown sugar and golden syrup. Heat until the sugar is melted, about 5 minutes. Remove from the heat. Grind the star anise in a spice mill, then stir into the butter with the cinnamon and vanilla paste.
Line the bottom of a 20 cm (8 inch) springform cake tin with baking paper so that the sugar syrup doesn’t leak through the edges. Cut the pineapple into 1 cm (½ inch) thick slices and add to the tin.
In a mixing bowl, mix together the flour, baking powder and a pinch of salt.
In the bowl of a standing electric mixer or using a large bowl and an electric hand mixer, beat the caster sugar and remaining butter. Beat for 2–3 minutes and then add the eggs, one at a time, and the vanilla. Beat for 2 minutes until light and fluffy. Start to add the flour and alternate with milk until they are both incorporated. Beat for another minute until smooth.
Spoon the batter into the tin over the pineapple. Bake for 1 hour, covering with foil if it starts to brown. Let sit for 5 minutes and then turn out on a platter and serve warm as a pudding with crème fraîche. Alternatively, cool completely in the tin and serve as a cake.