margouillatphotos/iStock/Getty Images

Some desserts are best when shared, and cheesecake is definitely one of them. It’s absolutely possible to demolish an entire chocolate cake or pan of brownies, but even the greatest enthusiast can run out of steam after a slice or two of cheesecake. It won’t normally spoil before you get the chance to eat it, but it might become unsafe to eat.

Shelf Life of Cheesecake

The very idea of leftover cheesecake might sound absurd if you’re a serious dessert lover, but it’s a notoriously rich treat, and small portions are usually the way to go. If you don’t have a lot of friends to help you work your way through it, you may find yourself coming up against cheesecake’s shelf life pretty rapidly.

A cheesecake is made up of things that are pretty prone to spoilage. It’s basically an extra-rich custard, made with soft, fresh cheese –cream cheese, ricotta or quark, usually –with cream, eggs and flavorings. If you look at the Food and Drug Administration’s storage chart for egg products, you won’t see a specific listing for cheesecake. There are similar dishes, though, including “casseroles with eggs,” “quiches with filling,” and “pies custard and chiffon.” They’ll all keep for no longer than three to four days in the fridge, which is a pretty good rule for cheesecake as well.

Spoilage, Visible or Otherwise

If you didn’t make or buy the cheesecake and don’t know how old it is, you can look for visible signs of age. If it’s dried and cracked at the edges, if the toppings have turned to leather or the cheesecake itself is yellowed and discolored, it’s probably past its prime. If it smells funky, has begun to ooze liquid or shows visible mold, it’s definitely overdue for the dumpster.

Unfortunately, with cheesecake, the real risks are the ones you can’t see. Potentially dangerous bacteria like salmonella and listeria thrive in this kind of environment, and unlike molds, they aren’t courteous enough to let you know they’ve taken up housekeeping in your food. You can’t see, taste or smell them, which is why foods that look and taste perfectly fine sometimes make people sick.

All you can do is play it safe by keeping track of when the cheesecake was made – and, more importantly, how long it spends out of the fridge – and discarding the remains once they’ve reached their limit.

Store Cheesecake Safely

If the cheesecake stays in your fridge the whole time, you should get a full four days from it. Ideally, it should be tightly wrapped or placed in an airtight container, so it doesn’t absorb any unwanted flavors or odors from other foods in the fridge.

It shouldn’t spend longer than two hours out at room temperature, which is how quickly bacterial populations can get established. It’s always best to cut your slice or two and return the rest to the fridge right away. That way, the main portion of the cheesecake stays safely cold.

Freezing Cheesecake

The best way to extend the life of your cheesecake is to freeze it. You can freeze the cheesecake either in large portions or single slices or some combination of both. In either case, because cheesecake is soft and squishy, it’s best to freeze the portions first on a sheet pan, and then wrap or bag them once they’re frozen.

Once frozen, the slices will stay fresh-tasting for a month or two in your freezer. If you like your cheesecakes topped with fruit, freeze your portions un-topped, and then add the topping once they’re thawed.

If you’re usually the only one in the house eating the cheesecake, you might find it more practical to make cupcake-sized mini-cheesecakes instead. They’re a perfect size for one-person snacking, and they don’t need to be sliced before you freeze them.