Cook spaghetti in salted water according to package instructions. While the pasta cooks, wash the cocktail tomatoes and cut them in half.
Heat a pan over medium-high heat. Add butter and allow it to melt. Add sugar and let it caramelize, watching carefully. Make the caramel as light or dark as you prefer.
Carefully place the tomatoes cut-side down into the caramel (warning: it may splash). Reduce heat to low and simmer for 3-4 minutes without stirring.
Drain the spaghetti. Stir the caramel tomatoes and season with salt, pepper, and sambal oelek. Add the drained spaghetti and toss to combine.
Serve with a colorful salad on the side. Parmesan is optional.