I always bake cakes in pans whose bottoms are covered with a piece of parchment, which I first spray with a coating of vegetable oil.
You can cool the cakes completely in the pans, refrigerate them, and then remove them easily when they are cold.