Study: Herpes virus could affect memory