Get the lanyard as discussed earlier and keep it with you on windy days. You have to clip up the lanyard at the back of your cap (the place where the cap strap is present used to tighten or loosen the cap to fix it on the head). Clip the lanyard with that part of the cap.
Wear the cap but make sure that you put the lanyard facing the other way then it is normally worn. It will just be like around the neck surrounded by the extension. It will look like that you are wearing a cowboy hat because the lanyard will come across to the front side of your neck. One strip of your lanyard should go from the right of your neck while the other one should go from the left.
The lanyard should surround your neck and when the wind blows off your cap off your head, the extension of the lanyard will allow the cap to travel a distance before it is pushed back with the tension in the lanyard that is wrapped around your neck. The cap will always be hooked around your neck, so you can retrieve it when it goes off your head.