Shifting on my mountain bike failed. Thinking it was the inner cable about to break, I replaced that, but noticed it was actually the outer gear cable which had worn through near the rear mech. So I replaced that. I knew the chain was in need of replacement, so put a new one on and cleaned up the cassette and chainrings. The new chain wouldn't shift properly and skipped over the smaller rear sprockets. So I need a new cassette, rear mech and likely chainset as well.
I think, because I mainly ride the bike fast on-road, I spend a lot of time on the small sprockets and wear them out. I guess this is what you get when you use the wrong tool for the job! So I figure I might be better off either getting a trekking chainset (28/38/48) to replace the mountain chainset (22/32/44), and/or a road cassette (11-23 or 11-25) so I get a better spread of wear over the cassette. But of course I'll then have a bike that's less use off-road, although in practice I almost never use the lowest ratios.