Coffee lovers are quick to tout the health benefits of their favorite beverage: It lifts mood and may even protect against certain cancers. And new research from Johns Hopkins University says that besides giving you a little extra pep, caffeine also serves as a memory enhancer.

Caffeine is the most popular central nervous stimulant in the world. About 80 percent of people in the U.S. consume caffeine in some form every day, according to the U.S. Food and Drug Administration. The average adult takes in about 200 milligrams, or about one strong cup of coffee, per day.

Read More About the Health Benefits of Coffee »

How Coffee Boosts Memory

The Johns Hopkins research team found that caffeine can enhance certain memories for up to 24 hours after it's consumed.

“We've always known that caffeine has cognitive-enhancing effects, but its particular effects on strengthening memories and making them resistant to forgetting has never been examined in detail in humans,” senior author Michael Yassa, an assistant professor of psychological and brain sciences at the Krieger School of Arts and Sciences, said in a statement.

Participants in the double-blind trial didn’t regularly consume caffeine, but for the study they were given either a 200-milligram caffeine tablet or a placebo five minutes after studying a series of images.

Unlike with most other studies on the effects of caffeine, these researchers administered caffeine after the memorization task, not before. They said this would eliminate the effects of increased attention, focus, or vigilance caused by the caffeine.

“By administering caffeine after the experiment, we rule out all of these effects and make sure that if there is an enhancement, it's due to memory and nothing else,” Yassa said.

Researchers took saliva samples from the participants one, three, and 24-hours after they took their pills to measure their caffeine levels. The research was published in the journal .

Learn About Other Foods and Beverages That Can Boost Your Energy »

Caffeine Aids in Pattern Separation

The following day, all the subjects were tested on their ability to recognize the images from the day before. Some of the images were new, while others had slight changes.

When quizzed, more of the people who took caffeine pills the day before were able to correctly identify the new images as “similar,” versus mistakenly citing them as the same. Researchers say these results show that caffeine affects a deeper level of memory retention called pattern separation. 

“If we used a standard recognition memory task without these tricky similar items, we would have found no effect of caffeine,” Yassa said. “However, using these items requires the brain to make a more difficult discrimination—what we call pattern separation, which seems to be the process that is enhanced by caffeine in our case.”

This may come in handy for college students cramming for a final: Caffeine after studying may be just as beneficial as caffeine consumed while hitting the books.

But How Does Caffeine Affect People With ADHD? Find Out. »

More Good News About Coffee

Many people believe that drinking coffee leads to dehydration, but new research published in the journal PLOS ONE says there’s no evidence to prove it.

In fact, the research team at the University of Birmingham School of Sport and Exercise Sciences in the U.K. found that moderate coffee drinking helps with a person's daily liquid requirement, just like other fluids.

“Despite a lack of scientific evidence, it is a common belief that coffee consumption can lead to dehydration and should be avoided or reduced in order to maintain a healthy fluid balance,” lead researcher Sophie Killer said in a statement.

Early research pegged caffeinated beverages as diuretics, but researchers say coffee’s effects aren’t the same as those of pure caffeine.

Killer and her colleagues studied 50 men who were told to drink four mugs of black coffee or water per day for three days, and were later told to switch their beverages. Women were excluded from the study because of fluid balance fluctuations associated with their menstrual cycles.

“We found that consumption of a moderate intake of coffee—four cups per day—in regular coffee drinking males caused no significant differences across a wide range of hydration indicators compared to the consumption of equal amounts of water,” Killer said.

See Why Green Coffee Isn’t a Miracle Weight Loss Aid »