Cut cold butter into cubes and quickly knead with flour, 2 eggs, a pinch of salt and nutmeg to a smooth dough. Wrap the dough in cling film and rest in the refrigerator for at least 30 min.
Cut the onions into thin rings and sweat them in a frying pan with butter until golden brown. Stir in the caraway seeds and season with salt, pepper and a pinch of sugar. Mix crème fraîche with the remaining eggs and grated cheese and fold into the onions.
Roll out the dough thinly on a floured work surface and place in a greased tart pan. Place the cheese and onion mixture on top and bake in a hot oven at 180 °C (upper-lower heat) on the bottom rack for approx. 30-40 minutes.
The cheese tart goes very well with Vogerlsalat.