It depends on the type of cake. Plain sponge cake, most store bought cakes, and cake with buttercream, fondant, or ganache filling or frosting are still safe to eat after 7 days in the fridge. Just to be safe, before eating, inspect the cake and check for spoilage signs such as rancid smell, mold, changes in color, and texture.