Depends on barrel material.
If you've got a steel barrel, you really oughtta run a nice oily patch through before putting it away for more than a few days at the very least.
Better, would be a kroil or mpro7 powder fouling removal, plus the oily patch. Powder residue attracts and absorbs moisture and will pit a steel barrel, and wreck it.
With stainless barrels, it depends on the cartridge. For moderate cartridges like 223, 308, even 260, don't do a damn thing. For very overbore cartridgesor the ones that burn a lot of powder, a quickie job of removing some/most of the powder fouling helps.