Line 2 baking sheets with parchment.
Divide the pastry into 3 equal portions. Roll out one portion to rectangle 1/8 inch thick and 10 inches in length. Sprinkle the Gruyere evenly over the surface and dust very lightly with cayenne. Use the palms of your hand or a rolling pin to firmly press the cheese into the dough. Cut the dough into 1/2" wide strips, twist them, and arrange them on a baking sheet. Continue with the remaining pastry, sprinkling Cheddar cheese on one batch and Parmesan and prosciutto, if using on the other, on the other. Chill for at least 30 minutes before baking.
Preheat the oven to 400 F. Bake the straws until puffed and golden brown, 8-10 minutes. Cool and serve.