Cable 'stretch' is the outers bedding in. It tends to happen when they're first installed, rather than with age. Problematic indexing after time is more likely to be either the inner fraying (perhaps inside the shifter), or accumulation of corrosion/gunk in the cable (unless it's something unrelated to the cables, of course).
I'd start by replacing the inner. If the old one is obviously knackered, the outer may be okay. If it's full of crud, you can flush it through with lubricant, but I've found that to be a temporary solution at best, and new outers are the only proper solution.
I note that the arrangement of cables on the bike makes a huge difference to how long the outers last (assuming that inners are destroyed by shifters at about the same rate) - bar end shifters plus under-seat steering is a recipe for cables that fill with water, while the outers last for ages on the bike that does the worst of the foul weather, because the cables stay dry (it's only the loop to the rear mech that tends to accumulate gunk).