I wash my kit on the delicate cycle and line dry after every ride, sometimes I’ll line dry them in the summer to dry the sweat and wash after 2 or 3 days worth have piled up. They always come out springtime fresh.
Never throw sweaty garments in the hamper.