I do many canned foods.
Did much research in this area and many not want to believe this, but, some canned foods can last for decades (The companies will not even testify to this)!
You will know if it not good when you open it. Especially if it make an uncommon hissing sound when opened.
Also, for smaller proportions, spam (and other stuff), now comes in convenient, single serve packages that not rust.
Canned fruits that have been tested (over 10 years old) may not looked good, but, they were still edible and still had nutrient content.
The main concern would be protecting the can from rust and such. True, I doubt many of us need a can of spam to last 10-20 years before we eat it, but, there is comfort in knowing it be there if you need.
Also, Spam make for a good Stuffing Box fix! Well, maybe not, but, I would give it a try as a last resort!
