Put the sugar and butter in a large and tall saucepan, then heat over medium heat.
As soon as the butter begins to melt, stir with a spoon. Don't hesitate to stir, the sugar will clump and form lumps, but everything will eventually melt gradually.
In another saucepan, heat the heavy cream to boiling, making sure to do so before the caramel begins to color
Remove the saucepan from the heat as soon as the sugar has completely melted and has taken on a nice caramel color, without becoming too dark. Pour in the hot heavy cream little by little while continuously whisking to avoid the formation of lumps.
Add the salt if unsalted butter has been used or if a saltier flavor is desired, taking care to avoid any splashes.
Be cautious of splashes !
Put the saucepan back on the heat and let it boil until the desired consistency is reached, between 2 and 5 minutes. Keep in mind that the caramel will thicken as it cools; the longer it boils, the denser its final texture will be.
Pour the caramel into a jar, straining it through a fine-mesh sieve to remove any caramel crystals.
Let it cool before closing the jar.