In an 8-quart pot, over medium heat, add the butter or oil. Then, add the sliced onions, bay leaves, brown sugar, thyme and salt. Sauté the onions with the spices for about 10 minutes, or until the onions are soft and start to turn a golden color. Add in the beer and the caraway seeds.
Continue to cook the onions until the liquid has mostly evaporated and the onions are fully caramelized, about 15 – 18 minutes. Turn the heat down to low and continue to cook until all the liquid has disappeared, but be careful to ensure that the jam isn’t burning on the bottom of the pot. Remove from the heat, place into a glass jar and let cool. Cover and refrigerate for up to two weeks.