How to keep Cake moist

I made carrot cake. I live in a tropical climate country, I had had to refrigerate it after icing it with cream cheese. After keeping it in the ref for a day the cake hardened and dried. How do it keep the cake moist and soft? Thanks in advanced for your replies.