They have found 3000 year old pots of dried bean seeds in Egypt that still sprouted. I buy a few one pound bags of beans, lentils, and dry peas when I see them and find about three bags fit into a one gallon Ziplock to keep out any moisture. I don't eat them much. They just go in the prep pile.
Other important things that never spoil are salt, sugar, honey, spices in unopened containers, Minute Rice, Potato Buds, dry milk.
They all need low humidity though so I put them in Ziplock bags too.
That 39 cent can of Morton's salt may be worth its weight in gold real soon.