Caffeine response is dependant on the individual. Caffeine has a very similar chemical make-up to adenosine which your body uses to transfer the energy you eat into energy your body can actually use (chemical energy). When your body has enough adenosine, it begins what is called a negative feedback cycle that stops adenosine production and sustains homeostasis. The feedback loops works by delivering a signal to put the body in a regenerative phase upon further adenosine binding. However, caffeine, being the wonderful individual that it is, disrupts that negative feedback loop and continues the conversion of excess (eaten) energy to chemical energy. But where in your body its dispersed is dependant on the individual.
The conversion to chemical energy is indirect though. Since adenosine is a principal neuromodulator, it actually tricks your body into behaving as it would at your most natural wakeful state. For example: Glutamate, GABA, norephinephrine, serotonin and acetylcholine are all inhibited by adenosine build-up at A1 receptors (a type of adenosine receptor) but caffeine stops adenosine from inhibiting these neurotransmitters. These five neurotransmitters all assist in metabolism (Glutamate is an essential compound in cellular metabolism).
Caffeine will never give you energy, it just uses your energy faster, in fact it probably causes energy debt from the work your body does to flush out the toxin.
In short: Yes it can enhance cognition, if the extra ATP (energy molecule made from adenosine) is carried to the brain. As it is not a homeostatic process it's difficult predict.
When the body is constantly put out of it's homeostasis, it adapts the toxin into its homeostatic balance (kind of like a beat em' or join em'). In this way, an individual's body begins to need the caffeine to function normally. Caffeine dependance is very low however, since it has been around for centuries, we've evolved to know it as a toxin but to not depend on it.
J Alzheimers Dis. 2010;20 Suppl 1:S3-15. doi: 10.3233/JAD-2010-1379.