If you're preparing the filling ahead for this homemade Boston cream pie you must keep it refrigerated. It should be OK on the countertop for an hour or so but any longer than that and you have to refrigerate it so it doesn't spoil.