Store spices in airtight containers, away from heat, moisture, and direct sunlight. Whole spices generally have a longer shelf life, so consider buying whole and grinding as needed to maintain optimal flavour.