Magnesium and aluminum lose electrons easily (causing corrosion), so:
+ keeping the metal dry so moisture doesn't accelerate electron transfer,
+ cool (to slow chemical reactions),
+ in a non-salty environment (salt promotes ion exchange),
+ clean (reducing moisture and chemical interaction),
+ and coat the metal with epoxy paint to keep oxygen off (or a hard powder coat, enamel, or at least WD-40 (WD: Water Displacement))
it should be good (or at least "better" in the case of WD-40).
If you think of this as "basic chemistry" it's pretty understandable and not so mysterious.