It is important to know how to keep your cooking and baking ingredients fresh. Many have either an expiration date or a "use by" date on the containers which should be followed. Shortening can turn rancid if it is kept in a warm environment. To keep it from going bad it can either be stored in your refrigerator or in a sealed container in a cool, dark, dry place. Sugar doesn't generally go bad, but it can develop moisture which causes lumps to form. If this happens then you can usually either knock the lumps out with a utensil or sift them out. Brown sugar will often harden into one piece over time. It needs to be kept in a sealed container. To help prevent hardening you can buy a small terra cotta piece which can be soaked in water and kept in the container with the brown sugar to help keep it moist. As an alternative, an apple can also be used with the brown sugar, but it needs to be removed once it has softened the brown sugar. It is not recommended that you keep baking powder more than 9 months because it needs to be fresh in order for your baked goods to rise properly. Cake mix contains a leavening ingredient so, though they will last a while on your shelf, it is best if you buy the cake mix just before you need to use it. Flour needs to be kept in a sealed plastic container. If you live in a humid area, bay leaves can be placed in the container with the flour to prevent bugs from finding their way inside. Keeping the flour in the freezer is also a great option. Finally, dairy products always have an expiration date which should be followed.