Heat the oil in a wok until smoking (180°C/350°F), and deep-fry the garlic, stirring constantly, until it turns light golden brown. Using a slotted spoon, quickly remove the garlic and drain on paper towel, then spread out to dry and let crisp. Repeat the process for the ginger.
In a heavy-based pot, combine the sugar, vinegar and chillies. Bring to the boil over medium