Ever buy some random food item for a recipe and have a ton left over that just goes to waste once you put it in the fridge? I have. Time and time again. Then, after seeing someone grind up fresh herbs and make cubes out of them, the lightbulb went off! It makes no sense to spend $2 to $4 on a container of a fancy sauce just to use a few tablespoons of it. Might as well go buy truffles or saffron threads!
Whether it's a commercial Mole sauce (like this one), pesto, broth, stock or even fresh herbs, those old ice cube trays collecting dust in the cupboard are there for a reason: to save you MONEY!
Just fill each cube with the item of your choice, freeze it, then remove the cubes and seal them in an airtight container or a plastic baggie. I double bag mine, just to keep them longer in the freezer. When you freeze sauces or pesto, just take a cube or three out, and let them thaw in a bowl before use. You can use broth cubes straight from the freezer to the skillet, because they melt down within a minute once they hit that heat.
I do recommend reserving these trays ONLY for food storage. Don't try to make ice afterward, or your iced tea is going to have a particularly funky twang to it! Frozen cubes last up to 6 months in the freezer, depending on how you store them.