Combine all the ingredients except the cornflour slurry in a saucepan, and bring to the boil.
Reduce the heat to a simmer and cook until the consistency of a thin syrup - it should reduce by about a quarter.
Remove the garlic and the ginger, if using, then whisk in the cornflour slurry.
Boil briefly until nice and thick.
Leave to cool, and keep in an airtight container in the fridge indefinitely.