Preheat oven to 180C. Place one layer of the potatoes in an ovenproof dish, overlapping them slightly (this should use up about a quarter of the potatoes). Season and scatter over a quarter of the onions.
Sprinkle a quarter of the flour on top, dot with a quarter of the butter and sprinkle with a quarter of the cheese. Repeat until there are 4 layers. Heat the milk and cream in a small pan but do not boil. Pour over the potatoes. Cover with foil and bake for 1 hour. Remove foil and return to the oven.
Bake for another 15-20 minutes until potatoes are tender and top is brown.