... but it's not the caffeine.
With n = 498,134 (!), they found "coffee drinking was inversely associated with all-cause mortality."
I haven't read the whole thing yet; here are some interesting bits from the abstract:
Similar associations were observed for instant, ground, and decaffeinated coffee, across common causes of death, and regardless of genetic caffeine metabolism score... These findings suggest the importance of noncaffeine constituents in the coffee-mortality association and provide further reassurance that coffee drinking can be a part of a healthy diet.
And drinking a lot of coffee is still good for you, at least in terms of all-cause mortality:
[We] found inverse associations for coffee drinking with mortality, including among participants drinking 1 up to 8 or more cups per day.