Pour the milk into a large saucepan, add the vanilla, and slowly bring to a boil. Remove from heat and set aside.
In a bowl, cream together the egg yolks and caster sugar until pale. Sift in the plain flour and cornflour, then whisk until smooth.
While whisking, slowly pour in the hot milk. Add the mixture back into the saucepan.
Heat the mixture, whisking constantly, until thickened and just starting to boil. Push through a sieve into a clean bowl.
Cover with cling film so it touches the pastry cream. Cool to room temperature, then chill in the fridge for 2 hours.