Place a rack in the top half of the oven and preheat to 375°.
In a large saucepan, combine 2 cups water with the milk, garlic and 1/2 teaspoon salt.
Add the potatoes and bring to a boil over medium-high heat, stirring occasionally to prevent the potatoes from sticking to the bottom of the pan.
Reduce the heat to medium and simmer until the potatoes are tender but still slightly firm, about 8 minutes.
Remove the saucepan from the heat and, using a slotted spoon, transfer half the potatoes to a buttered 9-by-13-inch baking dish; arrange the potatoes in an even layer.
Sprinkle with half the cheese and the cayenne; season with salt and pepper to taste.
Repeat with the remaining potatoes and sprinkle with the remaining cheese.
Pour the heavy cream evenly over the top.
Bake the scalloped potatoes until golden and crisp on top, 40 to 45 minutes.
Let stand for 5 minutes before serving.
French Style - Sprinkle 1 teaspoon chopped fresh tarragon between the layers of potatoes. Stir 1 heaping tablespoon grainy mustard into the heavy cream.
Greek Style - Substitute crumbled goat cheese for the Gruyere and sprinkle 1/2 teaspoon lemon zest and 1 teaspoon fresh oregano leaves between the potato layers.
Spanish Style - Layer the potatoes with 8 ounces thinly sliced chorizo and 5 chopped piquillo peppers or pimientos.