I don't have headaches so not sure about pain control, my migraines are gastric and triggered by high oestrogen. I always thought caffeine was just in cold medications to give you energy but I never take pain killers so really don't know.
The endocrinologist said I have too much fluid in my cells (from oestrogen, a vasodilator, dilating the blood vessels and letting fluid in) and caffeine and progesterone are vasoconstrictors (sounds like a snake!) that constrict the blood vessels to squeeze the fluid back out.
So it would make sense that if caffeine constricts the blood vessels when you don't have the high oestrogen / fluid retention, then it won't make you feel good as you may lose too many fluids.
It's so interesting to me as caffeine is like someone clicking their fingers and suddenly I'm ok, I thought for the last few years that I was imagining it and then that I was addicted (even though I don't have that much). However, I didn't have any for 4 months and I was worse than ever and now I know why.