The grease will last for decades if not longer, provided its in a sealed container like a wide-mouth screwtop jar or a screw-mouthed squeezable toothpaste-like tube:
The small amount of air trapped inside the container won't noticeably affect the grease over time.
However this kind of cartridge needs to be installed into a grease-gun when it is opened. If you do that it will store as well as the jar and tube. If you leave these cartridges open to air with no airtight seal, they will attract dust and trap potential contaminants like bugs or swarf.
The one thing to do for preserving lubricants is keep them stable. Don't expose to heat cycles, keep them in the shade and out of the weather, and away from children.