Herbs and spices should never be stored in the fridge owing to the humid environment. To keep larger quantities of spices fresh, store them in the freezer. Place them in tightly sealed containers and they will keep fresh for quite a long time.
If you wish to obtain the full flavor and aroma grind the whole spices in a grinder or mortar and pestle just before using them. For even better results, toast whole spices in a dry skillet over medium heat before grinding. Just don’t leave them unattended, because they burn easily.