1. Peel the onions and cut them in quarters, keep the stalk. Heat the olive oil and fry the onions for about 5 minutes. Add the cane sugar, the chili and the caraway. Stir. Cook over low heat for about 30 minutes.
2. Add Xérès vinegar. Salt and pepper. Allow to simmer for 20 minutes.