Typically the concern for shelf life revolves around two factors:
1. Spoilage rate, both for food borne illness and decreasing palatability
2. Degradation of nutrients
Shelf life will be greater in those foods with low water content or high salt or sugar content (since bacteria finds these environments difficult to live in). One reason that dried legumes (which have both a low water content and a fairly tough outer coating) have an extended shelf life and that honey can be kept for extended periods of time.
Container use is also an issue. Vitamin C is destroyed by oxidation; vitamin A by ultraviolet light so the nutrient content of stored items may vary depending on the containers used for storage.
As a very general rule, exposure of liquids tends to increase degradation of the product. Humidity from the air will make crackers and cereal soggy; this won't change their overal nutrient status but will decrease palatability. Airtight containers will increase shelf life.
A basic source of information on the storage life of certain foods can be found at
www.a1usa.net/gary/expire.html.
Gail