Yes, pastry cream is made with milk and eggs which are perishable ingredients and need to be kept refrigerated once they have cooled.