If you keep granular NaOH in a tightly closed container in a low humidity environment, it will last a long time. Problem is you need to be careful about keeping fresh air away from stored NaOH. Air contains carbon dioxide and water vapor and NaOH will quickly react with both. That lowers its purity.
I am happy using a storage method that KChaystack suggested --
Buy a polyethylene 5 gallon bucket. Either use the lid that comes with the pail -- this is the kind of lid you have to pry off -- or buy a separate "gamma" lid that can be screwed on and off the pail. Gamma lids are available online and in large building supply stores in the US (Menards, Home Depot, Lowes, etc.)
Buy a small bag of NON-clumping kitty litter or buy a desiccant pack. Desiccant packs usually contain silica gel or calcium chloride or calcium sulfate. Any will work fine. Damp Rid is a desiccant product you can often find in Walmart and hardware stores.
I use a desiccant meant for gun safes that has an indicator that tells when the desiccant needs to be recharged. It's fancier than really needed, but I had it on hand.
If using kitty litter, put 2-3 inches of litter in the bottom of the pail. Put your containers of NaOH in the bucket on top of the litter. If using desiccant, put the NaOH containers in the bucket. Add the desiccant pack near the top of the bucket, so you can check it from time to time to see if it's still working. Put the lid on so the bucket is air tight and keep the lid on as much as possible. When you need to use NaOH, be sure to replace the container back in the bucket right after you're done using it.
Important -- Keep the NaOH in its own containers and those containers go in the bucket. Don't put the loose NaOH flakes/granules directly in the bucket. A few folks have gotten confused on that point.