01 - In a small saucepan over medium heat, combine cherry tomatoes, granulated sugar, apple cider vinegar, salt, black pepper, and red pepper flakes if desired.
02 - Stir occasionally and cook until tomatoes break down and the mixture thickens to a jam-like consistency, approximately 15 to 18 minutes. Remove from heat and allow the jam to cool slightly.
03 - Lay out the sourdough bread slices. Spread tomato jam evenly over two slices. Top each with sliced or grated cheddar cheese, then close with the remaining bread slices.
04 - Spread softened butter on the outer sides of each bread slice.
05 - Heat a large skillet over medium-low heat. Add the sandwiches and cook until golden brown and cheese is fully melted, about 3 to 4 minutes per side.
06 - Remove sandwiches from the skillet, let rest for 1 to 2 minutes. Slice and serve warm.