Actually, this is not entirely true. Caffeine is not prohibited. I don't know how this myth got started, but it is not official church doctrine, even though a lot of mormons seem to think that it is.
Actually from what I recall only Alcohol and "hot drinks" and "cold drinks" are prohibited. That means you can drink anything as long as it doesn't contain alcohol and as long as it is lukewarm. (barf)
Cocaine, Marjuana, Heroin are not mentioned in the "word of wisdom" either. A lot of my Mormon cousins took that to heart.