The sun is the worst enemy for any garment (and your skin - always use sunblock!)
With swimwear, sun exposure is inevitable. But to prolong your swimwear’s lifetime, it’s very important to hang it to dry indoors because it has already served its time in the sun during your beach/pool hours.
To wash, simply rinse it with cold water and add a tiny drop of soap to take out any sweat smells. It doesn’t need more than 1 minute of gentle handwashing. Take out the soap very well in the rinsing process. You don’t want to keep it overnight with soap chemicals on it.
Please do not put your swimwear in the washing machine in order to prolong its coloring. Please do not dry clean or iron. Do not put perfume, oils, sunscreen, or any chemicals on your swimwear.