Spices usually have a fairly long shelf life, but there are some differences. For example, ginger, cardamom, nutmeg, peppercorns and cinnamon sticks will keep for about four years if stored well. Dried herbs, on the other hand, should be used within a year.
However, we recommend that you never buy too much of a spice at once. Over time, a spice loses intensity, colour and above all flavour.