It's kind of a tricky question, because it depends on what you mean by shelf life, and under what conditions. If you're going simply by the "best by" date, 4 years is a long time. If stored in completely air-tight, moisture-free places, a lot of dried pasta and grains can last well over 10 years though. Things like liquor, salt, and vinegar can last pretty much forever. Then you have a whole category of dried and freeze-dried foods. I still have some leftover freeze-dried meal packs from my hiking days from Mountain House. I believe they guarantee 30 years if they remain sealed.
For normal foods, stored in a typical pantry, I'd agree 4 years is pretty good

.