To make the caramelised onions, heat the oil in a large deep fry pan over a medium heat.
Add the onions and cook for a few minutes until soft and translucent, then turn down the heat and cook for another 30 minutes until golden and caramelised. Stir frequently to prevent the onions from burning.
Add the brown sugar and vinegar in the last few minutes of cooking. Take off the heat and allow to cool slightly.
Preheat the oven to 180°C
Lightly grease and line a loose bottomed tart tin with the shortcrust pastry, pressing into the sides slightly. Use a rolling pin to roll the excess over the edges then trim.
Place in the fridge to cool for 10 minutes.
Line the tart with baking paper and fill with rice or baking weights. Blind bake (bake without the filling) for 10 minutes then remove the rice and cook for another five minutes until the base is lightly golden.
Beat the eggs lightly in a bowl then add the cream, cheese and most of the caramelised onion. Leave some aside to garnish the top of the tart.
Season to taste and stir until well combined.
Pour the onion mixture into the tart pan and sprinkle with parmesan cheese and thyme.
Bake in the oven for 20 minutes or until the filling has set.
Allow to cool slightly before cutting. Add additional thyme if desired and top with extra caramelised onion. Serve warm with a rocket salad.