Mo, this is a "no easy answere" question! If you've made a boxed mix cake.. it will probably dry out pretty fast in the 'frige unless it's in an airtight container. It has so much sugar in it you can probably keep it well covered at cool room temp. for up to 3 days. Probably the best way to preserve cake, in my experience, is to slice off what you can eat in a few days and freeze the rest. Be sure to wrap it well before freezing. Let it thaw, still tightly wrapped, overnight at room temp. and it should be at least 90% fresh.
Carrot and apple cakes are much more moist and can survive refrigeration (again, well covered.. 'fridges are dry places) for up to a week. The really fruity moist cakes don't freeze that well.. maybe I should say that they don't THAW that well.. they can get soggy while thawing.
LIFE'S RICHES OTHER ROOMS ADORN, BUT IN THE KITCHEN, HOME IS BORN