We seal dried goods in the mason jars and I'd expect it to last 5+years. Rice, oatmeal,sugar.
We make our own granola and seal it up. No troubles with jars 2+years old.

Vacu sealer is a good investment.