If you are authorized to shop at military exchanges (i.e. - you are an active duty military member or a dependent thereof), you should contact the Personalized Services Office at the Navy Exchange closest to you to find out if they have the ballcap, etc., for which you are looking.
The availability of items depends upon the availability of stock on hand. If a ship is no longer in commission, the chances of getting memorabilia decrease as the time since the decommissioning increases.
More information on the Navy Exchange Command is available at their website.
If you are not authorized to shop at military exchanges, the military is prohibited by law to sell to you. You should search the Web for sites selling military memorabilia or check your local telephone book