I wouldn't order more pellets than you can use in preferably 6months but at most 8months. I really don't think even frozen that they would retain enough of their nutrient value after that point. Certain vitamins begin to get lost after 4-6months. First vit c, then generally the fat soluable vitamins, and so on until probably around 8-10months even the fiber would begin to break down.
Pellets will also stay fresher longer the smaller the containers you put them. The reason is that everytime you open the container to get more pellets you let more air in and it increases the speed at which the pellets break down. If you use a smaller container you expose less pellets to the air and you open it fewer times before it's gone and you move on to the next container which has only been exposed to the air once so far when you moved the pellets into that container. Kinda like leaving the bag of chips or loaf of bread open. It ends up stale faster.
Hay is much the same only it loses all vit c when dried, fat soluable vitamins within 2-4months, and then it stays pretty consistent until around 10-12months where the remainder of the vitamins, minerals, and fiber begin to break down provided it is kept at the correct moisture level with no sunlight. Letting it get too wet, drying it too much, or exposing hay to sunlight will increase it's rate of breaking down. These foods will not suddenly go bad or make a guinea pig sick in any way but their smell, flavor, and nutrient content will be reduced. It could lead to a deficiency if it lasted long enough but at the least the pigs won't appreciate basically stale food.
But when dealing with alot of pigs there's no reason to worry about food breaking down provided you freeze pellets and store hay correctly. 9 pigs ate 10lbs of pellets and 45lbs of hay last month. Ordering the largest bag of pellets it won't last 8months and will probably just make 6months. I ordered 235lbs of hay in total while it was on discount. lol The only real problem is where to store all the bulk orders.