To make the tart pastry, sift the flour and a pinch of salt into a large bowl. Add the butter and rub in with your fingertips until the mixture resembles breadcrumbs. Add the egg yolk, 2–3teaspoons of chilled water and mix with a flat-bladed knife until the dough just starts to come together. Bring the dough together with your hands and shape into a ball. Cover with plastic wrap and refrigerate for at least 30 minutes.
Preheat the oven to 180°C (350°F/Gas 4) and put a baking tray on the top shelf. Roll out the pastry on a lightly floured surface. Use three-quarters of the pastry to line the base and side of a 23cm (9inch) fluted loose-based tart tin.
Cook the leek for 10 minutes in a saucepan of boiling salted water, then drain. Heat the butter in a frying pan, add the leek and cook, stirring, for 5 minutes. Stir in the cheese. Tip into a bowl and add the unbeaten egg, egg yolk and cream. Season and mix well.
Pour the filling into the pastry shell and smooth. Roll out the remaining pastry into a round large enough to cover the pie. Pinch the edges together and trim. Cut a hole in the centre and brush the top with the beaten egg. Bake for 35–40 minutes on the baking tray until browned. Leave in the tin for 5 minutes before serving. Serve warm or at room temperature. The flamiche is best eaten on the day it is made.