The actual effect of caffeine on real life, open road cycling is not known. The caffeine effect depends on how much you habitually consume, or your tolerance for the drug. People who regularly drink two or more cups of caffeinated coffee a day may have to abstain from the stimulus for four or five days for the caffeine to help improve their performance. The timing of the caffeine intake can make a difference. Benefits appear to be highest when consumed immediately prior to exercise.
Caffeine is a diuretic.
Diuretics interfere with the kidney action by reducing the reabsorption of needed water and salts back into the blood. Diuretics can also increase urination. In either case, the body's water and salt levels go down. This can lead to dehydration, heat illness, and muscle weakness. If you consume caffeine before cycling, increase your water consumption during the activity.