Caffeine for headaches...?

I drank a Dr.Pepper yesterday and the caffeine really helped my headache!  I still feel sorta guilty about that caffiene, though.  Anyone else treating headaches this way?  I know tylonel is considered safe, but it still makes me a little uneasy, especially as a pharmacist friend once pointed out to me the possible link between Tylenol & ADHD.  Bogus or not, I'm still trying to avoid meds except for a prenatal. I'm sure caffeine is equally harmful.  Ugh, can't win!  Might just have to live with the headaches