Heat the oil in a frying pan over a medium heat and fry the onions for 8-10 mins until soft. Add the vinegar, sugar and thyme, and continue to cook for 12-15 mins until starting to caramelise. Meanwhile, cook the cauli ower in a pan of boiling water for 8-10 mins until tender. Meanwhile, make the cheese sauce. Melt 20g butter in a small pan. Stir in the flour and cook, stirring, for 3-4 mins until combined and golden. Add the milk gradually and continue to stir until the sauce thickens. Mix in the cauliflower and 80g of the cheese. Set aside.
Melt 20g butter in another pan and fry the leeks over a low heat until soft.Preheat the oven to gas 4, 180°C, fan 160°C. On a oured work surface, roll out a pastry sheet to a 26cm square. Cut into a 26cm-wide circle and place on a baking sheet. Spoon the onions onto the circle, leaving a 1.5cm border at the edge. Top with the cauliflower cheese, remaining Cheddar, and then the leeks. Moisten the edge of the pastry with water. Roll out the other pastry sheet to a 30cm square. Lay over the veg, pressing down to seal the edges. Trim into a circle. Score lines in the pastry with a knife out from the centre. Brush with egg. Bake for 35-40 mins until golden.
Freezing and defrosting guidelines
To freeze, prepare the pithivier, without brushing with egg, then wrap in nonstick baking paper and foil. To reheat, remove from the freezer, unwrap and defrost in the fridge overnight. Brush with egg and bake as instructed in the recipe. Once reheated from frozen, eat on the same day – do not reheat a second time.