If you can't remember when you changed the cables and housing just change them. Your shifting will improve. It's a cheap fix and a good idea to do on a regular basis.
The issue with the cables inside the housing is not dirt. The housings generally have some type of low friction lining which gets worn over time. You won't be able to see any signs of wear as it is internal to the housing.
Just change them.