A small study found decaf coffee improved memory, not caffeinated coffee. The discovery suggests other compounds in coffee may boost brain function.