It seems me like the algorithm for generating caves is mostly the same across all mapgens. So it would be nice to split it from mapgen completely. It would work like this:
Mapgen creates the terrain.
Mapgen calls the used cavegen in the appropriate place in the code. Some mapgens (like singlenode) don't do well with caves so they could skip this step.
Mapgen populates the terrain.
Actually, it already works this way but the cavegen is fixed for each mapgen. What I'm suggesting is that the user could choose mapgen and cavegen independently. Currently, two cavegens could be offered: "default" and "no caves". That would allow us to make more caavegens in the future.
What do you think?
If you lack the reality, go on a trip or find a job.
I don't know how well that would work and which effect it might have on mapgen speed. mg_villages has to go to some trouble to repair cavegen griefing. It's almost always an issue unless you can guarantee that none of the nodes of your structures are is_ground_content.
The speed would be almost the same because the only difference would be that the mapgen would have to decide which cavegen to use. So it will be slowed down only by one evaluation of switch statement per generated mapblock. So it will slow down by a few nanoseconds maximum, that's nothing compared to how long the mapgen takes.
Splitting cavegen from mapgen would actually help mg_villages because one could make/choose a cavegen which doesn't grief the villages.
If you lack the reality, go on a trip or find a job.