Heat oven to 190C/fan 170C/gas 5. Roll out the pastry on a lightly floured surface and use to line a deep 23cm fluted flan tin. Line with baking paper and fill with baking beans. Bake blind for 15 mins.
Heat the butter and oil in a large frying pan, then gently fry the onions, covered, for about 30 mins until completely softened, but still pale in colour.
Beat the eggs and cream together in a bowl, then add the cheese and some seasoning. Stir in the onions, then spoon the mixture into the flan case. Bake for 25-30 mins until lightly set and browned.