In a small bowl, combine onion, vinegar, sugar, caraway seeds, salt, dry mustard, and allspice. Cover; let stand at room temperature for 2 to 4 hours, stirring occasionally. Drain off excess liquid before serving. Chill, covered, up to 1 week.