Spoilage would happen even in storage, but the rate was temperature-dependent so you could make it last longer by keeping it somewhere colder. I remember there being some work on preserving food indefinitely by storing it in a barrel of vinegar.
You'd have to adjust your food production strategy to fit your climate. In a cold climate, you'd have a short growing season and need to set up cool storage/pickling barrels in order to survive the winter. In a very warm climate, you might not be able to get anything to keep very long, but you'd be able to grow crops year-round.