Similar to this question but with some specifics.
In the TV show The 100, the kids find a cache of assault rifles in the equivalent of a munitions dump. 97 years have passed since the latest timeframe when the guns could have been placed. They were stored in barrels of oil (or some other fluid, I believe they refer to it as oil in the show). They have a cache of ammunition in working order as well, but it isn't shown (or I don't recall) how that was stored.
If the guns were stored in crude oil would they still be functional once pulled out after 97+ years?
Theoretically, how long could they survive under those conditions and still be operable?
How could ammunition be safely stored for a century or more and still be functional?
What would the best way to store such weapons be to keep them functional (both the assault rifles and the ammunition for them)?