I've read a ton of reports on this over the decades, and the only thing everyone seems to agree on is that the number of hours caffeine affects any given individual increases with the age of that individual.
After that, all other variables (how long X amount affects you, how much you should drink, whether coffee is good or bad for you, whether caffeine is good or bad for you) seem to differ either by each body's highly individual metabolism, or depending on which study you're reading about (and wish to believe).