Mix egg yolks and sugar in a bowl.
Add cake flour and mix well.
Gradually add milk while whisking until smooth.
Strain the mixture and pour into a saucepan.
Cook over low heat, stirring constantly.
When thickened, remove from heat and mix in butter and vanilla extract.
Let it cool completely before using.