Nicotinic acid mimics the effect of a ketogenic diet in activating HCA2, which induces a neuroprotective phenotype in bone marrow-derived macrophages that infiltrate the brain and that this results in an improved outcome in a mouse model of stroke.