Whatever you use it on, make sure to wait for it to dry then lubricate, because the WD-40 will drive off both the water and the lubricant.
I'm with the others here; if a cable is rusty, it's probably time to replace it.
__________________
Work: the 8 hours that separates bike rides.