In a small saucepan, combine heavy cream, milk or half & half, 2 garlic cloves (smashed, peeled, and left whole), shallot, chopped thyme, salt & pepper. Bring to a simmer over low heat, stirring occasionally and making sure not to let the cream boil. Simmer for about 15-20 minutes, or until the garlic and shallot are very soft and tender. Remove cream mixture from heat and allow to cool slightly.
While the cream is simmering, grate the cheddar cheese using a box grater or a food processor with a grating blade. Set aside ½ cup of cheddar cheese to top the gratin. Next, grate ¼ cup of parmesan and set aside. Alternately, you can use parmesan cheese grated by your local grocery store. But like the cheddar, I don't recommend anything prepackaged (like Kraft or Sargento). You want the real deal!
Next, preheat your oven to 350° and prepare the baking dish. Cut the remaining garlic clove in half and rub it inside of your baking dish. Next, take the salted butter and butter the entire baking dish (bottom and up the sides). The butter doesn’t have to be completely smooth in the baking dish. Some dots of butter in the corners or on the bottom of the dish add great flavor!
As soon as the cream is off the heat, it’s time to cut the potatoes. Slice the potatoes to ⅛ inch thick using a sharp knife, a food processor with slicing blade attachment, or a madolin. Whatever you use, be careful not to cut your fingers!!
Arrange potatoes slices in the dish at an angle, almost like shingles on a roof, covering the bottom in a single layer. Continue shingling potatoes in the prepared baking dish until all potato slices are used, filling in any gaps by tucking in smaller slices. Set aside.
Pour the slightly cooled cream mixture (shallots, garlic, and all) into a blender and add all but the ½ cup of cheddar cheese. Blend the cream mixture and cheddar cheese until smooth. Taste for seasoning and add any additional salt and pepper if needed.
Pour cheese sauce over the potatoes. It may not look like you have enough sauce when you add it to the potatoes, but trust me, you do! Cover baking dish tightly with aluminum foil and bake gratin for 60-75 minutes, or until potatoes are tender and creamy. **If you are preparing gratin the day ahead, allow it to cool, then cover and refrigerate. Bring gratin to room temp before the next step.** Remove the foil from the baking dish and top gratin with the remaining 1/2 cup cheddar cheese and 1/4 cup parmesan cheese. Place on the top rack of oven and broil on medium-high for 5 minutes, or until cheese is browned and formed a crust. Top with additional thyme leaves if desired. Serve immediately. Remaining gratin can be stored tightly wrapped or in an airtight container for about 3-4 days.