My policy is the opposite – I switch companies every two years. Especially if I get too comfortable. Usually because I’m bored or because the company grows too much (>100 people is too much for me).
1-1.5 years in a fast-paced software team is plenty enough to learn 95% of everything you're ever going to learn there and live through one major system lifecycle.