Are you washing the cap? If you have a "ball cap buddy" that prevents it from getting out of shape, you can easily use it in the washing machine.
"Ballcap Buddy" is recommended for people who don't know how to wash the cap and are worried about losing its shape. With this, you can easily wash the cap in the washing machine or dishwasher.