Preheat the oven to 325°F (160°C). Butter a 9-by-13-inch baking dish.
In your largest bowl or container, beat the sugars and oil until very well blended. Add the eggs, 1 at a time, beating well after each addition. In another bowl, combine the flour, baking soda, cinnamon, nutmeg, and salt, and gradually add to the sugar and eggs, mixing just until well blended. Stir in the vanilla. Then incorporate the apples and pecans. The batter will be quite thick and mostly apples.
Scrape the batter into the buttered baking pan.
Bake the cake until a skewer or toothpick inserted in the center of the cake comes out clean and the sides of the cake begin to pull away from the pan, 60 to 75 minutes. (You may want to begin checking the cake for doneness after 50 minutes.) Remove the cake from the oven and let it cool in the pan while you prepare the caramel glaze.
Make the caramel glaze
Melt the butter in a saucepan, and add both the sugars and the salt. Stir until blended, and cook over medium-low heat for 2 minutes. Stir in the heavy cream, and boil for 2 minutes, stirring constantly. Remove from heat.
Assemble the apple cake
Use a skewer or toothpick to poke holes all over the top of the apple cake and pour the warm caramel glaze over the surface. Slice and serve warm or at room temperature.