Preheat oven to 180°C (350°F) and grease a 9-inch baking pan.
In a large bowl, whisk together flour, baking soda, cinnamon, and salt.
In another bowl, mix sugar, brown sugar, eggs, oil, and vanilla extract.
Combine wet and dry ingredients and mix until smooth.
Fold in chopped apples and pecans.
Pour batter into prepared pan and spread evenly.
Bake for 35–40 minutes or until a toothpick comes out clean.
Let the cake cool in the pan for 20 minutes.
In a saucepan, melt butter and add brown sugar and milk.
Bring to a boil and cook for 2–3 minutes while stirring.
Remove from heat and stir in vanilla extract.
Pour warm caramel glaze over the cooled cake.