Wrap it in cling film and place it in the refrigerator for at least 30 minutes. As soon as it begins to thicken, remove it from the heat and whisk constantly for a few minutes while it cools. Pierce the pastry several times with a fork and place in the refrigerator until the filling is ready. To speed up browning the top you can also place it in an oven shelf closer to the top. Let the flan to cool then place it in the refrigerator for 4 hours before serving.