I have just looked at 2 caps. One (Gap) has no washing instructions and the other (no name) says:
100% cotton
Hand wash only
Wash dark colours separately
The 100% cotton bit can't be true because I guess that the insert of the peak is made of plastic. Consequently, it is likely to be affected by temperature.
I bet that, if you put it in the washing machine on "cold wash" (or even warm) it would be OK. Don't put it in the drier though!
If you do this, please post the result here for everybody's information.