Caffeine was shown to increase the activity of an enzyme (called NMNAT2) that is known to protect against dementia.
“It is likely that there may be several different compounds present in coffee that may have a positive effect on cognitive function. On a side note, retinoic acid (vitamin A) was also shown to boost the activity of this enzyme although to a lesser degree than caffeine.”