The priming compound in today's percussion caps is not corrosive like the old corrosive primers that used potassium chlorate as an oxidizer. Those left a corrosive residue of potassium chloride salt in the bore.
However, the residue left by modern #11 caps can hold moisture on the metal in a humid environment. So even though the residue itself is not a corrosive compound the moisture encourages rust.