The link between caffeine and migraines is something of an anomaly. For some people caffeine can provoke an attach, for others a caffeine-containing medication will bring relief. Read about some of the studies into this paradox.
In 1979, the highly respected Lancet Journal published an article identifying caffeine as a suspected migraine trigger. Various theories about caffeine and other substances in products that contain caffeine have since been explored.
As is frequently the case with food intolerances, one person will not react to a specific food, whilst another can suffer a severe reaction to the same food. Consider the shellfish - a killer for some, a healthful food for someone else.