The Giants, winners of five straight overall, swept a four-game series at Chase Field, mirroring what befell them at the hands of Arizona in San Francisco April 25-27.
Asked whether he felt all the way back after two seasons filed with elbow and forearm injuries, Cain said:
"I don't know if you ever feel that way. It's definitely been good two starts in row. So let's keep moving from here."
But the most important thing is that his arm feels healthy.
"Yes, it does," Cain added. "It has felt good. I just have to keep things going."
Giants manager Bruce Bochy has been waiting for the back of his starting rotation to get into gear. The top three: Madison Bumgarner, Johnny Cueto and Jeff Samardzija, have combined for 14 of the club's 22 victories.
Jake Peavy has won once, and Cain hasn't notched a win since last July 22. He's 0-8 since then in 17 starts. So let's say he's overdue.
Peavy and Cain both pitched well enough to win this weekend against an Arizona club that is 5-16 at home and has a negative-38 run differential. They each gave up a run -- Peavy on three hits in six innings on Saturday -- but neither were around to earn a decision when the Giants won each game in the ninth.
"What a solid effort [Cain] gave us today," Giants manager Bruce Bochy said. "It's good seeing he and Peavy throw like that. Matt maintained his stuff, and that pitch count. In that last inning, he had some work to do and he was over 100 pitches. He kept his focus, maintained his stuff and made quality pitches."
The D-backs scored their only run on Paul Goldschmidt's fourth-inning sacrifice fly. And that happened because Jake Lamb hit a one-out double and moved to third on a wild pitch.
But to Bochy's point, Cain, who allowed seven hits, walked two and struck out five, pitched out of some trouble in the sixth and seventh innings.
In the sixth, he sandwiched walks to Goldschmidt and Chris Herrmann around a Welington Castillo base hit to load the bases with two out. Yasmany Tomas swung at the first pitch and popped out.
In the seventh, Brandon Drury led off with a single -- he had four in the game -- and went to second on a sacrifice bunt. Jean Segura flied out to the warning track in right and Chris Owings grounded out to short.
And for Cain on the day, that was all she wrote.
Bochy said that Cain's progress in his last three starts is just a matter of attaining and maintaining his confidence.
"I think the confidence has been there," Cain said. "I think it's just a matter of staying with that confidence while the games are going on and not getting too worried about when you get into situations.
"It's nice to know that stuff I've been working on in the bullpen is starting to translate into the game."