CFL nominal rated lifetime is ~8000 hrs. But this will be affected mainly by operating voltage, manufacturing defects, exposure to voltage spikes, mechanical shock, frequency of cycling on and off, lamp orientation, and ambient operating temperature, among other factors. Out of the above causes, at least "frequency of cycling on and off" and "lamp orientation" can be contrlled by the user.
I do not have much information about how "lamp orientation" will affect lifetime of CFL.
But according to energysavers.gov, if you frequently on/off CFL its lifespan can be reduced to close to that of incandescent light. energystar.gov suggests if you leave the room for less than 15 minutes, better to switch on the CFL. In other words, switch off CFL when you are out for more than 15 minutes. Therefore, using CFLs in bathroom may not be a wise idea becasue, though it gives a reduced light bill, CFL replecement cost will tradeoff the benefits you get from a reduced light bill.
Next time, wait 15 mins before turning it off again... :)
1 - CFL#Lifespan