If you made a big batch of flavorful sauce (like pesto), an easy way to preserve it is to pour it into a clean ice cube tray, cover with plastic wrap, and freeze! Pull out a cube or two anytime your dish needs a little kick.
Store leftovers and sauces in the refrigerator safely for 3 to 4 days.
Source: USDA