After cooking, if the food is hot I heard it is better to leave it out until it cools. Why? Because if you place it hot in the refrigerator, the bacteria will grow there.
On the other hand, I think that leaving it out too much on the shelf would also attract bacteria.
So what is the truth? What should I do, leaving it out to cool off or placing it hot in the refrigerator?
Leaving the food out to cool off after cooking
food-safetyrefrigerator
Related Solutions
hobodave's answer is most of the way there but I think it understates the importance of protein toxins. With the vast majority of foodborne illnesses, the bacteria aren't particularly harmful at all; what you need to worry about is the protein toxins they produce.
E.Coli - probably the most well-known form of food poisoning along with Salmonella - is actually a harmless bacteria that already lives in your lower intestine. But there is a particular strain of E.Coli, notably O157:H7, that is primarily associated with food poisoning. The reason? It produces what's called a Shiga-like Toxin.
E.Coli contamination is actually dangerous on two fronts. Because the bacteria are so well-adapted to surviving in the human digestive system (as I pointed out earlier, that's their primary habitat), ingesting even a relatively small number of the bacteria will result in them multiplying and producing those toxins in your gut (and the rest of the way down). This is why it normally takes several days for you to feel the effects of this type of food poisoning; that's how long it takes for them to produce the toxins in sufficient quantity for your body to notice.
But they don't need to be in your gut to produce those toxins; a piece of meat at room temperature provides good enough conditions and more than enough raw material for them reproduce and emit those same toxins. So if you leave it sitting out too long, then it really doesn't matter how many bacteria you kill, you are going to end up with E.Coli poisoning fast, because you don't even need to wait for them to produce the toxins; they're already there.
The problem is that you can't "kill" a protein toxin with a brief burst of heat because a protein isn't alive. It's just a protein. The temperatures and times needed to destroy that toxin would be similar to the temperatures and times needed to destroy all of the protein in the food, draining all the nutrition value and quite possibly turning it into a lump of charcoal.
Salmonella seems to be a fountain of misinformation with all sorts of people saying that it doesn't produce toxins. This simply isn't true. Inside the host it produces what's called an AvrA toxin (which isn't "toxic" per se, but allows the bacteria to grow to larger numbers), and some strains can also produce a CdtB toxin, which is highly toxic. (Apparently there's also a similar toxin produced by other strains.) I'll be honest, a lot of the medical mumbo-jumbo is way beyond my ability to comprehend, but it seems that a lot of the public confusion comes from the fact that salmonella can do some nasty things even without the toxins - but that doesn't mean that the toxins themselves can't do plenty of damage even if you manage to kill the bacteria.
The same applies to many other types of dangerous bacteria; C.diptheriae produce the diphtheria toxin, C.botulinum produce the botulinum toxin (botulism); even the infamous mad cow disease was, as far as we know, caused by a protein, not a bacteria, which is why it was able to be transmitted to humans even through cooked beef.
Are protein toxins the only reason why the USDA insists on a maximum 4-hour cumulative danger zone? Probably not. As hobodave says, the more the bacteria multiply, the harder is to kill all of them, even at high temperatures. The figure of 74° C / 165° F that the food agencies give us for poultry is not going to kill exactly 100% of all the bacteria, and if it only kills - I'm just throwing out a number here - 99.999% of them, that may be good enough for relatively fresh poultry but won't be enough if you've got a whole bacterial colony to worry about.
We can only speculate as to exactly what's entailed by the "danger zone" but my guess is that it's actually a combination of statistics, probabilities, and safety margins, which include, but are not limited to, the effects of protein toxins.
Summary:
If the loaf is kept at an elevated temperature in a plastic bag for a period of 6-12 hours I believe you will see little to no difference compared to storing at room temperature.
Stored at an elevated temperature in a paper bag the loaf will start to dry out to a noticeable extent.
Note that the answer below does not address possible food safety issues.
Long-winded details:
My previous answer provided some information up to 36°C (97°F). Since the question asks about the temperature range 35-55°C I did some amateurish experimentation of my own.
Using my fan assisted oven at the lowest setting, I halved a store bought sourdough loaf and placed one half in the oven overnight and kept the other half at room temperature (25°C).
I should note that my oven temperature fluctuates between ~37°C and ~47°C (99-117°F) measured using using a Thermapen at various intervals. I'll also note that I wrapped the loaf-half that went into the oven in a tea towel to protect it from the oven fan.
In the morning I taste tested the two loaf-halves. The room temperature loaf had started to stale slightly but the half from the oven had also started to dry out. It was noticeably more difficult to cut through the loaf-half from the oven and I saw about 8mm of visibly dried bread extending inwards from the outer surfaces.
This test was quite obviously flawed in that you would neither use a tea towel to wrap your bread whilst in the car, nor would you first cut the loaf in half.
The next experiment I did used 5 smaller loaves of the same variety, from the same store. I placed two in a plastic bag and two more in the paper bag in which the loaves were purchased. The fifth loaf I kept at room temperature in order to compare later.
Using the same oven setting I kept the bagged loaves in the oven for 6 hours. After six hours I removed two loaves, one from each bag, and taste tested.
Comparing a small slice of the loaf from the plastic bag to a slice from the room temperature loaf I sensed no obvious difference. The loaf from the paper bag was noticeably drier. I marked the loaves from the oven and saved them for comparison again later.
Keeping the remaining two loaves in the oven for a further 6 hours, I did another taste test this morning.
The loaf that had been kept at room temperature had now slightly but noticeably started to stale. Comparing this to the 12 hour loaf from the plastic bag I noticed hardly any difference. I really couldn't say whether one was less stale than the other. Comparing the 12 hour loaf from the paper bag, once again drying was pronounced.
I also made a second comparison using the loaves that had been taken out at 6 hours. Again I sensed no obvious difference between the loaf from the plastic bag and the room temperature loaf. The 6 hour loaf from the paper bag was no less dry than it had been 6 hours before.
Update:
I followed up on @Athanasius question from the comments and did another test with the oven fan switched off. This time I had to fight with the oven thermostat to stay within the temperature range but managed to stay just under 130°F. I tested three small loaves of the same variety and from the same store as the previous tests. Again, I kept two in the oven in paper and plastic bags, and one at room temperature (also in a paper bag). As well as taste testing I also weighed the loaves before and after the test. Here are the figures for weight loss after 6 hours:
- Elevated temp, plastic bag: no measurable weight loss
- Elevated temp, paper bag: ~7% weight loss
- Room temp, paper bag: ~4% weight loss
While I don't have any objective means for comparing dryness from the previous experiment (I didn't weight the loaves in the previous test) it does seem like the oven fan led to increased drying. As a subjective measure I offer the fact that following yesterdays testing I discarded both the 6 hour and 12 hour loaves from the paper bag, but this morning I found the loaf from the paper bag good enough for breakfast despite the drying.
The words in the summary are, however, still correct: stored at an elevated temperature in a paper bag a loaf will start to dry out to a noticeable extent.
Best Answer
I leave my hot food (usually stews or soups) out (things like steaks and such go right in, covered), for a while, for a number of reasons:
A 'skin' forms over the top of the liquid, preventing evaporation via steaming, which creates a cooling effect.
I stir the pot frequently, bringing the hottest food out of the center, allowing it to cool faster.
I don't want to put hot food in the refrigerator, it will tend to warm up the other foods already in there.
I like to cover the food once it's in the refrigerator. If I put a pot in uncovered, the chances are fairly good that I'll forget about it and have dried glop the next day.