Melt the butter in a pan and gently fry the leeks, shallots and thyme until softened (5-10 mins). Pour in the white wine and leave to bubble away for 5 minutes. Add the double cream, season and simmer gently for 5 minutes. Transfer to an ovenproof dish and leave to cool.
Sprinkle the grated cheese on the top and bake in the oven for 20-30 minutes at 180C/gas 4. Serves 8 as a side dish