Another method to wash ball caps that I find works very well, since most brims now have a plastic insert instead of cardboard, is to wash them along with a permanent press, low spin, warm or cold washload in your clothes washer. This allows you to pre-spray with stain remover if needed.
Do not put ball caps in the dryer though, since most are made of cotton and may shrink, and the brim may not retain its proper shape. Just hang to dry.
For leather ball caps, I would recommend only professional cleaning.