hi pornhitzman!
The best thing to do is to let the pasta or whatever 'cool off' to room temperature and then refrigerate it.
Its NEVER a good idea to refrigerate anything HOT or WARM because this escalates the probability of promoting e coli and other nasty little food critters from doing you more harm than good!
Having been in the restaurant business for a good portion of my youth, I was told this by a food inspector, and this especially applies to foods with animal or dairy products in it.