For the speedo cables, I usually use some PB Blaster with the cable in, ride it a bit and then remove the cable from the housing, and thoroughly-flush the cable housing until I stop getting rusty lube and perhaps bits of rust out of it. I usually will use my air hose/rubber tip to blast any residual crud out, use a good wheel bearing grease on the cable, re-insert it into the housing, re-attach it all, and go for a noise-free ride.
Sometimes you notice the meter needle jumping before it seizes and breaks, alerting you to the problem needing lubrication after cleaning. As I recall from my days of riding starting in the 1960's, broken cables of all types were much-more common before the advent of hydraulics. I dunno, maybe the metallurgy is better? Also, the slimmer nature of a speedo or (in the old days) a tach cable under a constant drive load is probably different from the vigorous use a drum brake cable or clutch cable gets.
This is from a bicycle cable shifter operated by a handlebar twist grip, but you get the picture. I used to have a KZ 1000 that because of the very short, stubby handlebars it had, put the clutch cable at a bad position, and they would quickly fray and fatigue the steel strands in a couple months. It got so that I would recognize the difference in clutch resistance, as the strands broke, and take it off the road for another replacement.