Special equipment: a mandolin; an 11-by-7-inch baking dish
Preheat the oven to 375 degrees F.
Place the cream, garlic, thyme and cayenne in a saucepan, and season with salt. Taste to make sure it is adequately seasoned. Bring to a boil and then turn off the heat. Steep the mixture for 15 to 20 minutes.
Grease the baking dish and layer in one-third of the sliced turnips. Sprinkle one-sixth of the grated cheese over the turnips and dot with one-sixth of the butter. Remove the thyme and garlic from the cream and pour one-sixth of the cream over the turnips. Repeat the layering five more times, alternating the turnip with sweet potato, until all of the ingredients are used up, for a total of six layers.
Cover the dish with foil, place on a baking sheet and bake for 35 to 40 minutes. Remove the foil and bake until golden, another 20 minutes. When done, a fork should slide in and out of the center of the dish easily.
Rest the dish 10 to 12 minutes, then serve.
A mandolin is the best way to achieve very thin slices of turnips and sweet potatoes.