Just being in a cave… What is retreat for? It is to realize the three principles, and to create merit and purify. This is what is required for realization.
Look at Marpa and Milarepa. Marpa spent so much time scolding Milarepa and so forth, but then when Milarepa’s mother took him away to another lama, and Milarepa went into a hole to do retreat, there was nothing! No signs, zero! Then, the lama asked whether Milarepa had received permission from Marpa to come to him and do that retreat.
[For the rest of this story, see Milarepa’s biography.]