3 years for ‘software’ – harnesses, slings, ropes, HELMETS
5 years for ‘hardware’ – rocks, Friends (although not the slings on them), krabs etc
That is pretty much what you hear all the manufacturers quote and therefore what training schools will also pass on. It will be questioned over and over, as to how much degradation a rope receives if it is in contact with air, and only some exposure to UV over the course of, say, 3 years, when someone just sticks it in a cupboard somewhere.
I would seriously think twice if I was getting back into climbing about using my older kit, but only for trad leading, as the forces generated in top-roping and sport are much, much lower when you fall.