Caffeine does ideed help. It is proven to prolong endurance before fatigue starts. About the amount in a shot of espresso is the amount before a workout will do it. Even if it is an hour before. More is not better. It simply will not help and adding more during a very long workout is not helpful. I ride two to four hours at a time or run two hours. The most important thing is to replenish with sports drinks and/or hour energy gels every 30-40 minutes of strenuous excercise.