Minimize heat, light and moisture and you extend the shelf life of your spice collection. Spice Advice notes that heat causes flavor loss, light causes color loss and moisture results in clumping, mold and break down. Refrigerators eliminate heat and light, but definitely do not eliminate moisture; many even promote moisture.
Hussin states that refrigerators help spices keep, but proper packaging makes a huge difference. Hussin emphasizes that spices must be stored in air-tight containers if you plan to keep them in the refrigerator. Furthermore, Hussin warns that spices' original packaging rarely keeps out moisture or sufficiently seals the spices, and recommends storing your spices in small, air-tight stacking containers in the fridge.
Spices Etc recommends that customers keep spices in an air-tight container in the freezer instead of the refrigerator, due to the lower level of moisture. Pantries are another good option, though make sure that your pantry does not get particularly hot at any point during the year, or your spices will lose their flavor.
Regardless of the integrity of your containers and the zeal with which you store your spices, all spices have a shelf life. Even dried spices should be replaced eventually. Spices Etc states that most spices retain fresh flavors for a year, if stored properly, while cooks can use dried and treated spices for up to three years.