Add 1/3 cup water to a pan.
Add 1/3 cup sugar, 1/3 cup white vinegar, 1 tablespoon chopped garlic, 1/4 teaspoon salt, and 1/2 tablespoon chili flakes to the pan.
Bring the mixture to a boil and cook for 5 minutes.
In a small bowl, combine 1 tablespoon cornflour with 2 tablespoons water, mixing well to form a smooth slurry.
Gradually add the cornflour mixture to the pan, stirring continuously.
Cook until the mixture thickens to a sauce-like consistency.