Ground spices are the things that will lose their flavor fastest, but there are things like cinnamon and ginger that are not something you want to grind with normal machinery. For these kind of spices, and some of those Indian masalas, that I make a lot of, I put a smaller amount in jars, and put the rest in a vacuum sealed bag - they keep much better that way. I do the same with whole spices, though with things that could puncture the bags, like whole cloves or star anise, I put it in another bag, folded over, then seal the outer bag. Another thing that can be done with those is put spices in mason jars, and suck the air out of them, so almost all the oxygen is gone, and the spices will stay fresh much longer.
The large amounts of coriander and cumin I get in the Indian markets I put in those vacuum sealed bags, then when I need to refill the fairly large jars I keep it in, I snip off a corner of the bag, pour it into the jar, and re-seal it, with the Vacu-vin; ground spices I keep in smaller jars, and just refill it more often.
Some things you'll want to refrigerate or freeze are things that will go rancid. Sesame seeds, white and dark poppy seeds are two things that come to mind. And something I keep in my freezer is saffron, simply because I almost never use it! I got a generous amount of it once, relatively cheap, and I keep it in one of those mason jars, and evacuate the jar again, before putting it back in the freezer.