Pix, what Le Nubian said. I know it's disappointing right now, but it was not wasted time. Also, I am convinced that networking is never a bad thing. I've hired people two years after an interview (or getting their resume the first time) because the right thing came along and I remembered them.
This. I have a new person who started this month and she first interviewed well over a year ago, and again over the summer when there wasn't actually an open position. She was very proactive about reaching out and it paid off when a role came open that was right for her.