Preheat the oven to 180°C (fan). Dad roll the pastry onto a lined baking tray and mark a 2cm border around the edge (don't cut through completely) and pierce the center with a fork.
Cook the leeks and spring onions gently in oil for 6–8 minutes until softened. Season well, mix in the mustard and thyme, then let it cool slightly.
To assemble, spread the soft cheese within the border of the pastry. Place the leek mixture on top and spread the Caerphilly cheese and pine nuts over.
Brush the edges with the beaten egg and bake for 20–25 minutes until golden, puffed and crisp underneath. Allow to cool slightly before cutting and serving with a side salad.