Coffee: When it helps, when it hurts

Many people take caffeine always, or never. But the evidence is clear: for some tasks, drink coffee—for others, don’t.
Caffeine:
So:
Use caffeine for short-term performance on a focused task (such as an exam).
Avoid caffeine for tasks that require broad creativity and long-term learning.
(Disclaimer: The greater altertness, larger short-term memory capacity, and eased recall might make the memories you do make of higher quality.)
At least, this is my take. But the issue is convoluted enough that I’m unsure. What do you think?