His chance to exact some revenge is now at hand.
Cain will try to lead the San Francisco Giants to a fifth straight win Wednesday night when they continue a three-game set at Citi Field.
One of the worst starts of Cain's career came July 10 against the Mets as he failed to make it out of the first inning for the only time in 263 starts. He was lifted after recording only two outs, allowing three runs, two hits and three walks in a 7-2 loss.
''He was disappointed to come out, but I had to make the call,'' Giants manager Bruce Bochy said after that game.
Since that early exit, the right-hander has gone 3-3 with a 2.65 ERA in nine starts. Cain (8-9, 4.24 ERA) had his second consecutive strong outing Thursday after spending 15 days on the disabled list with a bruised right forearm. He limited the Dodgers to two runs - one earned - in seven innings of a 3-2 loss.
Cain was 3-1 with a 2.01 ERA in his previous five starts versus New York (67-83) before that abbreviated July outing.
Angel Pagan kept the Giants (70-81) hot Tuesday, going 3 for 3 with a homer, a triple, three RBIs and three runs scored in an 8-5 victory.
The Giants have outscored opponents 35-13 during the four-game run, their longest since a season-best six-game streak April 29-May 5.
"I know we're not going to go to the postseason or whatever, but if we finish strong I think we can reflect for next year and get ready, use this year as a motivation to prepare," Pagan said.
Pagan was 4 for 21 with eight strikeouts entering the night against the team he spent 2008-2011 with.
"He's done such a nice job since he's come back," Bochy said. "I think we've seen the difference he makes in our club, and he certainly showed that tonight."
The Giants are 34-28 with Pagan and 36-53 without him. He missed 84 games with a strained left hamstring.
The Mets' loss was overshadowed by some positive news earlier in the day with the announcement that Matt Harvey will try to rehab his injured right elbow without reconstructive surgery - a move the All-Star ace hopes is going to keep him on the mound next season.
"We have to be optimistic, because he is optimistic," manager Terry Collins said. "If he's able to be successful, that would be a great find for the organization headed into next year."
New York will try to avoid a fourth straight home loss to San Francisco behind Aaron Harang (0-1, 4.50), who joined Harvey and Pedro Martinez as the only players in Mets' history to record double-digit strikeouts in their franchise debut.
Harang tied a season-high with 10 Thursday, allowing three runs in six innings of a 7-2 loss to Washington.
Though the right-hander has yet to see the Giants this season, he's 4-2 with a 2.12 ERA against them since 2008.
He has had success against Pablo Sandoval (4 for 23), Brandon Crawford (1 for 6) and Brandon Belt (0 for 5).
Hunter Pence, however, is 10 for 33 (.303) in their matchups. Pence is 14 for 29 (.483) with six homers and 20 RBIs during a seven-game hit streak.