Heating or cooling the material to be extruded or the stream of extruded material or of a preformed part