I make sure I store my yeast in a container in the fridge. I usually buy the packets because that's easier, but I still keep it in the fridge. That's always worked well for me.
I don't do much bread baking, but I've found the dry yeast, as opposed to a yeast cake, works very well for me. I usually buy it right before I need it, and always, always, check the expiration date to make sure it's at least a year in the future. That's just the smart, and money-conscious thing to do. Working with yeast is tricky and I want to take the guesswork out by using fresh yeast.