Preheat oven to 375°F. Line 2 baking sheets with foil and place a wire rack on top. Lightly rub each rack with olive oil.
In a shallow bowl, combine the brown sugar, rosemary, and a pinch each of salt and pepper.
Place both sheets of pastry on a lightly floured counter. Brush the surface of each with a beaten egg. Evenly sprinkle about 1/2 cup of cheese over each sheet, then sprinkle with cayenne. Dust a rolling pin lightly with flour and roll the rolling pin over the cheese, gently pressing the cheese into the pastry. Fold the pastry in half, then cut each into 12 (1/2 inch) wide strips. Pinch the ends to seal, then gently twist each strip several times to enclose the cheese. It’s ok if some of the cheese falls out.
Take a piece of bacon and wrap it around the twisted pastry. Repeat with the remaining twists. Dredge the twist through the brown sugar mix, tossing to coat, placing the twist on the prepared baking sheet as you go.
Bake 30 to 50 minutes, rotating the pans halfway through. My bacon took 50 minutes to cook, start checking the twists at around 30 minutes. Serve warm!