Metformin, a drug commonly used to treat diabetes, slows cognitive decline and reduces dementia risk in older people with diabetes.