caffeine inhibits the enzyme [phosphodiesterase] which breaks down cAMP. This enzyme is more active if you eat a high fat diet like "Keto"
Based on these findings, the researchers concluded that consumption of saturated fats disrupts hypothalamic functions by suppressing cAMP/PKA signaling via the activation of PDE4A. With this mechanism in mind, they believe that inhibiting FFAR1 and/or increasing cAMP signaling is a potential therapeutic target that can counteract the effects of genetically induced or diet-induced obesity on depression.
https://www.naturalnews.com/2020-01-27-high-fat-diets-are-literally-depressing.html