A rich, decadent cake is the ultimate sweet treat, but unfortunately, it won't last forever, even if it's been properly refrigerated or frozen. Prior to eating your cake, check it for signs of spoilage, including unpleasant changes in texture, smell or taste.
When Good Cakes Go Bad
Visually inspect your cake for signs of mold and discard it if you find any. Mold filaments can penetrate deep into your cake and can't simply be cut away, warns the U.S. Department of Agriculture. If your cake and its frosting have hardened, toss it because it's gone stale. Check the frosting on your cake for changes in color, smell and texture because cream-based frosting may curdle and separate, spoiling the entire cake. When you cut into the cake, inspect any fillings for signs of spoilage, including curdling, mold or unpleasant odors. Discard any cakes with egg- or dairy-based frosting or fillings that have been left out for more than two hours in temperatures above 40 degrees Fahrenheit, even if they still look and smell good, recommends the Clemson Cooperative Extension.
The Shelf Life of a Cake
Cakes made with frosting or fillings containing cream, custard or fruit will spoil within two days, as opposed to those made with buttercream, which can last up to one week in the refrigerator at 40 F or below. Most cakes will last for up to four months when wrapped in plastic and frozen at 0 F, although those with cream-based frosting or fillings will not freeze well.