The storage life of cartridges is limited by the storage life of the gunpowder.
Black powder does not deteriorate. Water will ruin the stuff, but dry cartridges loaded with black powder, or cannon shells loaded with black powder have an extremely long shelf life. Every so often you will read of someone who died from a Civil War artillery shell going off.
Smokeless single based and double based powders start deteriorating the day they leave the factory. Nitroglycerine and nitrocellulose want to combine to form a lower energy compound. Nitric acid gas is released as a by product of this reaction.
The reaction rate is directly proportional to heat. The hotter things are, the faster the migration and reactions.
The Navy initially test for acid gas by the Methly Violet test, or Talliani test. If acid gas is detected than a chemical analysis is performed to determine the amount os stabilizer in the powder. (Stablilzer is either MNA or 2-NDPA)
When the concentration of stabilizer is LT or EQ to 15% of the original content, the Navy scrapes the lot.
The Army does things different. They scrap based on clock time. 20 years for double based powders, 45 years for single base.
The best storage conditions for powder is artic cold. That is cold and dry.
Water damages powder and water causes nitroglycerine to wick to the surface. A surface rich in NG will cause pressure spikes.
I would there fore advise storing powder and ammunition in as cool and dry conditions as possible.
If your cases has case neck cracks, it is highly likely the powder inside is outgassing nitric acid and damaging the brass. The stuff should not be shot as the burn rate of the powder is now unpredictable and the case may split in the case head.
I don't know the shelf life of primers. If they go dud then whatever is in the case is not going to go bang.