Store bought cakes will last longer if stored with 1/2 of an apple.
This page contains the following solutions.
Keeping Cakes Good for Eating. A few years ago, a dear pal baked us a cake. It was a very, very moist cake... She didn't say how long it would keep for or if I should freeze it or refrigerate it. . .
To keep cakes fresh, especially pound cakes, place a slice of apple beside the cake inside the container. The cake will actually become more moist.