Villagers had entered the cave last week to look for valuable minerals before becoming trapped by flash flooding.