Good idea to make a spare. Every year I examine the cables in the ex-box to look for fraying. Perhaps every other year I also back out the cable ends from the twist shifter to check for fraying. Fraying seems to happen more often in the ex-box compared with the shifter; the latter I've not observed. Perhaps owing to the smaller radius of the cable bend in the ex-box. In contrast, shimano drop bar shifters fray more often in the shifter, which can be a nightmare to fix on the road, even if you have a spare.
I have had very good luck with long cable life, except in bar end derailleur shifters which I have on three bikes. I think hand sweat can get into the cables on those shifters and accelerate corrosion. The cable in the first two photos broke after four years. I thought I was only using stainless cables, but this cable looks like it is galvanized.
The above was the second time I had a shifter cable go bad in a bar end shifter. First time, third photo, I could feel the sharp broken ends so I had warning to change this cable when I got home. I still had three strands remaining when I got home.