IIRC, the reason caves are dangerous in a thunderstorm is because the current from the lightning strike is trying to get to the watertable, if there is a hollow space with a nice conductive object in it (you) it may try to go that way instead of through the rock. I would assume that this applies to caves in the side of mountains which are likely to be hit. Caves deep underground are probably not what is meant by this warning.