We aimed to investigate whether consumption of tea and different types of coffee at midlife are associated with dementia later in life and whether sex or ApoE4 influence such association. Here, APOE is linked to dementia.