DENVER — All things considered, the Giants got good news Thursday morning. MRIs showed a Grade 2 right hamstring strain for Santiago Casilla and a Grade 1 strain for Matt Cain. Both pitchers left Wednesday’s win with injuries.

Casilla is expected to miss about four weeks while Cain hasn’t yet been ruled out for his next start. He will receive treatment for a couple of days before the Giants decide if he needs to be put on the disabled list for the second time this season. Casilla was put on the DL on Thursday, with right-hander George Kontos taking his roster spot.

Casilla was hurt while running out a grounder in the ninth inning Wednesday. Before the two-out at-bat, Bochy told Casilla not to swing. “He said, ‘I’m good, Papi,’ ” Bochy said.

“We were shocked he was going that fast,” Bochy added, smiling. “I don’t think that hamstring has ever seen that speed.”

Casilla was scared when he hit the ground, thinking he had reinjured a knee that needed surgery last year. Later, he told Bochy he knew he screwed up, that he wasn’t supposed to run.

“My adrenaline got going,” Casilla told his manager. “I took off.”

Bochy regrets what happened, but not the setup. He wanted Walt Weiss to send a left-hander to to hit against Casilla so Bochy could turn to Affeldt. The staff never seriously thought Casilla would get hurt.

“I take responsibility. I should have called timeout and said that’s it, you’re not going to swing again,” after the foul ball, Bochy said. “But these guys love it. The relievers live for that. He’s always joking around and walking with a bat in his hand and going, ‘You’re going to let me hit? Let me hit.’ Part of the game is having fun. You think it’s low risk, but it’s like these guys have to touch the stove to find out.”

Bochy will get the pitchers together in the coming days to remind them to be careful, whether they’re starters, relievers, in a tight game or a blowout.

“We’ve got to learn from this,” he said. “Be smart and realize we’re not looking for you to beat out an infield hit.”

For more on the Giants, see Alex Pavlovic’s Giants Extra blog at blogs.mercurynews.com/Giants. Follow him on Twitter at twitter.com/AlexPavlovic.