Brandon Crawford had three hits and two RBIs, and Buster Posey and Denard Span added two hits apiece for the Giants. San Francisco won for only the second time since the All-Star break.
It had been longer than that for Cain.
The former Giants ace failed to make it past the fourth inning in his three previous starts and wasn't much better against the Reds. He retired nine of his first 10 batters but quickly wore down and left with one out in the sixth after giving up the first of two homers by Adam Duvall.