For the pastry, sieve the flour and salt into a bowl and make a well in the centre. Rub in the butter, then add the egg and bring the dough together with a splash of water. Pull into a ball shape, wrap in cling film and chill in the fridge for at least one hour.
Grease a 25cm/10in flan case. Roll out the pastry and lay in the flan case, leaving a little pastry overhanging. Rest it in the fridge for 30 minutes. Preheat the oven to 180C/350F/Gas 4.
Prick the base of the pastry, lay a circle of greaseproof paper on top, followed by baking beans and bake blind for 20 minutes. Remove from the oven, leave to rest and trim off the excess pastry.
For the filling, heat the oil in a frying pan and cook the bacon until lightly browned. Remove the bacon with a slotted spoon, retaining the oil.
Add the butter to the oil and slowly colour the onion. Leave to cool, then sprinkle in the flan case. Sprinkle the bacon over and break in the soft cheese.
Beat the eggs and double cream together and mix with 110g/4oz of the grated cheese and the parsley. Season with pepper and pour into flan case. Bake for 20 minutes.
Sprinkle over the remaining cheese and the nutmeg and bake for a further 5-10 minutes, until set. Leave to cool for five minutes. Remove the flan ring and slice to serve.