Preheat the oven to 350 degrees F. Grease an 8-inch square pan with nonstick cooking spray and set aside.
In a large bowl, stir the oil and sugar together with a spoon, don't use a mixer. Add the eggs, vanilla, pineapple, and carrots.
In a separate bowl, stir together the flour, baking powder, baking soda, and cinnamon. Sprinkle the dry ingredients over the wet and stir until just combined. Gently fold in the raisins, if using.
Pour the batter into the prepared pan and bake for 33-36 minutes or until cake is nicely golden brown and starting to pull away from the edges of the pan. Remove from the oven and let the cake cool completely.
While the cake is cooling, make the frosting. If you are using the caramel candies, melt the caramel in the microwave with a splash of water, set aside. If you are using the salted caramel sauce, just stir it and set aside.
With an electric mixer, beat the cream cheese and powdered sugar until light and fluffy. Stir in the melted caramel or salted caramel sauce and vanilla extract. Stir until frosting is smooth.
Frost the cooled carrot cake with caramel cream cheese frosting. I like to drizzle a little extra salted caramel sauce over the top of the cake. Cut into squares and serve.
Note-cover the cake and store in the refrigerator for up to 3 days. You can bring it to room temperature before serving or eat it cold. I like carrot cake cold:)