Cave grabbed a first-half try along with Franco van der Merwe as Ulster ran the show. However their second-half was in complete contrast to the first as the Ospreys stormed back within two points and looked the more likely to grab the winning points.
In the end Ulster, though found enough in the tank to put Cave in a position to grab victory and move into joint top with the Welshmen.
It was a typical Friday night home games at the Kingspan — rain, and of the swirling variety too which made life very difficult for those on the park. Ulster, though, showed fine skills at handling despite the greasy condition of the ball and not afraid to vary their direction.
It was Ulster who made the most of the conditions and were soon ahead in the 10th minute. They turned over an Ospreys scrum and following a series of rucks, international Cave dived through a melee to score with Jackson converting.
With the Ospreys pinned inside their own half and under the cosh, Jackson punished the Welsh side for an indiscretion and increased that lead with an angled penalty in 20th minute. Ulster were in total control at this stage, particularly at the set-pieces, and even when the Ospreys ventured into their half there was no real panic.
Jackson thumped over another penalty in the 31st minute but was matched by his opposite number Sam Davies two minutes later as the visitors opened their account. But Ulster finished the half strongly and went in 18-3 to the good after grabbing their second try on the whistle with Springbok V d Merwe crashing over from a line-put drive.
It was the visitors who got the scoreboard rolling immediately on the restart as they countered with their own rolling maul with number eight Dan Baker bundling over and Davies converting.
With the rain incessant, play became scrappy with Ulster not able to find the rhythm achieved in the opening period and it was Davies with two penalties who brought Ospreys to within two points with 20 minutes remaining.
However, Cave’s second effort two minutes from time and Humphreys conversion saw Ulster home and also denied the visitors a bonus point.
Tries: Cave 2, van der Merwe. Cons: P. Jackson, Humphreys. Pens: P. Jackson 2.
Olding, Ludik, Cave, McCloskey, Gilroy, P. Jackson, P. Marshall, Black, Herring, Herbst, Stevenson, van der Merwe, C. Ross, Reidy, Wilson.
Replacements: Humphreys for P. Jackson (64), Warwick for Black (69), Fitzpatrick for Herbst (69), Williams for C. Ross (61).
Tries: Roberts. Cons: Davies. Pens: Davies 3.
D. Evans, Grabham, Bishop, Beck, Natoga, Davies, Roberts, D. Jones, Parry, Arhip, Peers, Bernardo, King, Lewis, Baker.
Replacements: Dirkson for Bishop (63), M. Thomas for D. Jones (39), Thornton for Parry (71), Griffiths for Arhip (62), Dwyer for Bernardo (71).
Neil Hennessy (Wales).