If you get mold on a piece of soft cheese, like Brie or Camembert or even simple goat cheese, you should throw it away. That's because mold on soft cheeses is hard to contain, so the spores can infect the whole piece of cheese even if it doesn't look like it's gone bad. So how do you prevent mold from growing on your beloved, and likely expensive, soft cheese? By learning how to store soft cheeses correctly, of course. And if you can master these cheese-storing tips, you'll be able to keep soft cheeses mold-free and ready to eat for at least a few weeks.

The first step is to buy high-quality cheese, ideally as a whole round rather than a precut wedge. If that's not possible, opt to "buy portions that are cut while you watch," rather than precut, explains food scientist Harold McGee in On Food and Cooking: The Science and Lore of the Kitchen. "Precut portions may be days or weeks old, and their large exposed surfaces inevitably develop rancid flavors from contact with air and plastic wrap."

In general, you don't want to store your fancy soft cheeses in plastic wrap for too long. Tightly wrapping delicate, soft cheese in plastic will trap in moisture and restrict the flow of oxygen, which "encourages the growth of bacteria and molds, not always the cheese’s own," writes McGee—though folks at the California Milk Advisory Board note that if you're planning on enjoying your cheese within a couple of days of purchase, you can just store soft cheese in the fridge in the original plastic wrap without much decline in quality.

But don't expect soft cheeses to last for long in plastic wrap. The editors at Cook's Illustrated found that soft cheeses wrapped in plastic were the first to show signs of mold. As they explain in the Cook's Illustrated Cookbook, the best way to keep soft cheese fresh for as long as possible was to wrap the piece in waxed or parchment paper first, followed by a loose layer of aluminum foil. "The paper wicks moisture away, while the foil cover traps enough water to keep cheese from drying out." Using this method, goat cheese stayed mold-free for about a week, and Brie was good for about a month.

Just remember to take that cheese out of the fridge about an hour before you serve it so it has a chance to come up to room temperature and taste as good as possible.