Caffeine from coffee, tea, soda or even tablet, has the beneficial effect of enhancing memory, according to a new study led by a former Johns Hopkins University researcher.

More research needs to be done, but the findings could be used to help understand how long-term memory works and have an impact on cognitive decline, the researchers said.

The researchers said it’s long been known that caffeine has a cognitive effect, but they found that it has a particular effect on strengthening memories and making them resistant to forgetting.

The researchers gave study participants who don’t normally consume caffeine a placebo or a tablet with the average amount of caffeine consumed by 80 percent of Americans -- 200 milligrams, or the equivalent of two small cups of coffee. Unlike past studies, they did this after they looked at images rather than before.

Those who got the caffeine were correctly able to recognize differences in the images the next day, reflecting a deeper level of memory retention. Those who got did not get the caffeine thought the images looked the same.

 “The next step for us is to figure out the brain mechanisms underlying this enhancement,” said Michael Yassa, who was an assistant professor of psychological and brain sciences in the Hopkin’s Krieger School of Arts and Sciences before moving to the University of California-Irvine.

“We can use brain-imaging techniques to address these questions,” he said in a statement. “We also know that caffeine is associated with healthy longevity and may have some protective effects from cognitive decline like Alzheimer's disease. These are certainly important questions for the future.”

The research was published by the journal Nature Neuroscience.