Gas Cap Issues?

Im sorry to post such a question hat will prolly be noobish but i have been searching and havnt found a thread about it....

first problem:

i bought 1998 f-150 xlt 4.6L 2wd about a month ago i drove it for about 30 mins and the check engine light came on... i drove to advanced auto and they checked it and said it was the gas cap well he took off the cap and put it back on and used the programmer to clear the code... went fine for rest of the day then next day the light came on again so i drove it for 2 days with the light on cuz of work then went to O'rielys and they said the same thing cleared the code and it went away for a day and now its back on again.... the gas cap seems to be brand new and its not a screw on cap you just push it in and twist half a turn and its locked in... has anyone had this before is there something besides the gas cap that could be doing this or should i just buy a new cap anyway....

2nd problem:

Problem with the wiper control arm... sometimes when i turn the wipers to the slower speeds it wont come on till i get halfway thru the settings to medium/high speed... also to get the washer to spray out i have to push the cap i 10-15 times to get it to spray washer fluid on the window.. i believe that arm has a short in it or something is it hard to remove and replace?

thanks in advance for your help and sorry to waste anyones time if this question has been discussed before i swear i searched first...

I had a filler tube problem also on my Ford van, it is not real expensive to replace and is easy. They rot and get brittle and develop cracks like rbrais said. You can also check the gasket on the inside of the gas cap to see if it is damaged.
I doubt it is the gas cap if it feels like it seals when twist it.
1/4 turn is correct for the cap.

Wish I'd found that write up when I still had my 97 Town car because it was having the same issues with the wipers... I knew it was in the multi-function switch, but I didn't have the b@//s to try to fix it, LMAO! Oh well... I traded it in for my F150, so alls well that ends well! HAHA!

get a new non locking gas cap, with some of the locking ones it will cause the check engine light to come on for some reason, this happened on my grandpas 97, he put a non locking one on and the light went off. strange