Rinse the button mushrooms under cold water to clean them of any excess dirt. If there is any dirt attached to the stems, cut that part away.
Slice the mushrooms thinly, caps and stems.
Finely chop the sliced mushrooms until you reach a gravel-y consistency and set them aside
Finely mince 1.5 cups of onion and set aside.
Finely chop 1.5 Tbsp garlic and set aside.
Pick 1 Tbsp of fresh thyme leaves and set aside.
In a large saute pan or dutch oven, melt 2 Tbsp butter over medium-high heat.
When the butter is melted, add the cremini mushrooms, minced onions, minced garlic, and a generous pinch of salt.
Cook on medium-high heat while stirring until the mushrooms begin to release their liquid.
Once the mushrooms have released their liquid, turn the heat down to medium and allow everything to cook for about 15- 20 minutes, stirring occasionally, until the liquid has evaporated.
Once the liquid has evaporated, cook the mushrooms for an additional 2-3 minutes so that the mushrooms start to brown very slightly.
Add 1/3 cup madeira (or other cooking wine) to the pan and cook until it has evaporated.
Add 1/4 cup heavy cream and 1 tbsp picked thyme leaves to the pot.
Cook this mixture over medium heat until the cream has thickened and reduced.
Once the cream has reduced and the mixture is no longer liquidy, turn off the heat and season the mixture with 2 tsp vinegar and salt and pepper to taste. The mixture should be pleasantly seasoned. Set this mixture in a bowl and place in the refrigerator until it has come down to at least room temperature before using on the tart.