MIND or MED diets could help to preserve some cognitive abilities in midlife, particularly episodic and visuospatial working memory. Effects may be mediated by high dietary fibre content and increased abundance of short-chain fatty acid producing gut bacteria. Longer follow-up with repeated measures of cognition will determine whether diet can influence changes in cognition occurring in older age.