When you wear a cap, your hair will get messed up and it's almost impossible to keep dry. I would suggest putting it in a bun before you put the cap on. After you swim, braid it or put it in a pony tail. Other options are a French braid, a fishtail, or a bun.
I swim to. I usually put my hair up in a high bun or braids, but I always pin up my baby hairs that lie on the back of my neck because my cap rubs against them and really damages them. Hope this helps!