Cain, a three-time All-Star and author of a perfect game earlier this season, will be making his 22nd start of the season.
Cain, 10-4 with a 2.82 ERA, took the loss as the Giants were beaten Wednesday by the Mets, 2-1.
Cain threw 97 pitches in five innings, his second-shortest start of the season, and gave up seven hits and both Mets runs.
Mets leadoff hitter Ruben Tejada, who had gone two seasons and 629 at-bats without hitting a home run, took Cain deep in the first inning.
Most pitchers would be satisfied with a pitching line like the one Cain put up against the Mets, but Cain isn't most pitchers.
"He was battling himself out there, but that's how tough he is and how competitive he is," Giants manager Bruce Bochy said. "Two runs in five innings, that's not bad considering the pitches he threw, and he gave us a chance."
Cain's pitch count was at 71 through three innings.
"I felt fine in the bullpen, but for some reason I went out there and it all changed," Cain said. "I just battled myself the whole time. It was a long five innings for me."
Westbrook's last start turned rocky over a seven-batter sequence in the sixth.
After skirting around trouble early, Westbrook watched a 3-1 Cardinals lead evaporate before he recorded a sixth-inning out. The Rockies opened the inning with four consecutive extra-base hits to plate three runs.
"It was more of a case of leaving balls in the middle of the plate and making mistakes," Westbrook said. "You definitely don't want to see that many in a row, especially with a lead."
Westbrook is 10-8 with a 3.79 ERA in 21 starts this season and, like Cain, was at less than his best in his last outing.
But unlike Cain, Westbrook came away with a victory behind Matt Holliday's two home runs and five RBIs in a 9-6 Cardinals victory.
Westbrook pitched six innings and gave up nine hits and five earned runs. He walked four batters.
Giants: Pence delivers
• Hunter Pence, acquired Tuesday at the Trade Deadline from the Phillies, entered Sunday's game against the Rockies hitting .118 for his new team, but went 2-for-5 with three RBIs as the Giants won, 8-3.
• Sunday's victory gave the Giants a sweep of their three-game series against the Rockies and left them still in possession of first place in the NL West, half a game ahead of the Dodgers.
Cardinals: Furcal good to go?
• Shortstop Rafael Furcal is likely to return to the starting lineup. Furcal missed the five games before the Brewers series due to back stiffness, so the Cardinals want to be very careful not to push him so far that he reinjures the back. "I just think after missing five in a row, you don't want to throw him quite back into it every day," manager Mike Matheny said. "Just help him any way we can to get better. We're going to have to back off."
• On Friday night, the Cardinals began a stretch of 16 of 19 games over a period of 21 days at Busch Stadium. They play the three road games during that stretch at Philadelphia next weekend.
• Giants third baseman Pablo Sandoval, on the 15-day disabled list with a left hamstring strain, took grounders before Sunday's game, but Bochy does not expect him to return to action against the Cardinals. Sandoval is on course to be activated in about a week, Bochy said.
• Matheny was asked if there is correlation between Furcal's offensive decline since April and his health.
"Health always has something to do with it. Usually, it's more physical than approach," Matheny said. "He's fighting through and still getting big hits for us. He had some game-winners and he's been amazing defensively and as consistent as anybody in the league, in my opinion."