Edit: Its not as simple as "OMG it's cheese, you HAVE to put it in the fridge." I mean cheese itself is a way of preserving dairy products to make them last without refrigeration. Most of the rest of the world doesn't refrigerate their cheeses. Also, if the cheese is mixed in and then cooked its a different story as well. I mean, have you ever made cookies or brownies that use milk. Thats a dairy product and yet you don't feel compelled to put that in the fridge.
Did you put cream cheese in it and then cook it, or is it a cream cheese frosting?
If you put the cheese inside the cake or in the cake batter and then cooked it, then I'd only refrigerate it if you're keeping it longer than a day or two, just keep it under a lid, like one of those cake server things. For short-term storage your biggest enemy is going to be drying out and staling. The refrigerator is only going to speed this up.
For a cream cheese frosting, I'm not sure, but it would make sense to toss it in the fridge.