Pour 1/4 cup granulated sugar into a large deep sauce pan or pot, then place it over medium heat.
Let the sugar melt and turn brown. Keep an eye on the pot so the sugar does not burn.
Meanwhile, in a separate pot, combine 2 1/2 cup sugar, 1 cup heavy cream, and 2 tbsp all-purpose flour. Mix and bring to a boil.
Add a couple of tbsp of the cream mixture to the melted sugar mixture, and stir. (It will bubble, this is okay.)
Next, add the caramelized sugar to the cream mixture and stir in. Let it cook for about 10-15 minutes.
Next, add in the butter and stir until it is all melted.
Remove the pan from the heat and add in the vanilla extract.
Pour the caramel into a stand mixer bowl OR a heat-resistant bowl. Mix for 20 minutes on medium speed, then let sit for about 15 minutes.
Place 1/2 of the caramel into a freezer-safe bowl, then cover and place it in the freezer for 10 minutes.
With the other 1/2 of caramel, pour some of it on top of the bottom layer of cake. Place the second cake on top. Beware that the caramel will be really slippery, so don't overdo the caramel filling.
Use the remaining caramel to lightly glaze the sides and top of the cake.
Remove the rest of the caramel from the freezer and stir to loosen the frosting.
Frost the cake!