San Francisco Giants pitcher Matt Cain has arthroscopic surgery on his right ankle and is expected to be sidelined for two months.