My rams have never spawned in caves. They lay their eggs on flat rocks on the substrate.

That makes me doubt that your fish was guarding eggs. Hope I'm wrong, however.