Preheat oven to 180°C (fan bake) or 190°C conventional
Slice onions thinly and cook in a little butter with a pinch of salt until just browned. Set aside to cool completely (or pop in the freezer to cool quicker if you're in a hurry)
Whisk eggs with cream, a little salt, and lots of black pepper. Set aside
Line your tin with baking paper for easy removal
Cut pastry to line the tin. Smoosh the edges together with a fork so there are no leaks
Spread cooled onions over the bottom, then add bacon and a handful of grated cheese
Pour over the egg mixture and top with a little more cheese
Fold the sides of the pastry in and brush the exposed pastry with some of the egg mixture
Bake 45–60 minutes. Poke a knife in the center to make sure it's set
Let sit 5 minutes before slicing
