References should be folks who have a great view of your current, impressive work. Using references who you have only stayed in contact with for the purpose of them being a reference sort of defeats the purpose of a reference.
Instead of thinking of a person as a 'reference' you should think of them as a peer or a contact. You should stay in contact with folks whose work and interests mirror, complement or supplement your own. That's not to say you don't send holiday cards to your old boss from 5 years ago. But that IS to say that no matter how influential or cool they may be, they're not a good reference if they haven't had meaningful interactions with you and your work within the last, say, year.
A year is a pretty arbitrary amount of time to be honest. What matters is that it is recent enough that that person can talk to your skills, strengths and experiences. If that person has the memory of a goldfish and can't say more than "Yeah FreakyDan was pretty cool" then that's not a great reference. If, say, you helped land a person on the Moon and that person can remember your contributions then a couple of years ago isn't unreasonable. But let's be honest, most of us and most of our accomplishments aren't as memorable as helping land someone on the moon. With that in mind, it makes sense to use as references those who are close enough to your work and to whom that work is fresh in their experiences.
The trick, then, to keeping cool and influential people in your list of potential 'references' is to stay engaged in projects, events or activities that involve those people beyond your time at a company. Consider open source projects, volunteer events or other non-work specific activities as a way of growing and maintaining your pool of potential references. This also opens things up a bit when it comes time to naming references...
I think it's important and valuable to have diversity in your references. What does that mean? If a prospective employee Bob has only references from one job/company and prospective employee Sue has references from several different organizations/companies/events. Then Sue looks and sounds more impressive. References aren't the end all be all. Honestly, most of the jobs I've gotten and most of the candidates I've reviewed - references are rarely if ever contacted. This is different depending on the job level(if you don't have a lot of experience references can be a bigger deal, also management jobs tend to be more interested in references) as well as field(my friends in the health care field get their references called way more often than I do) and region/customs where the company is located.