You can cook and blanch the green beans up to three days ahead of time. Drain and store in an air-tight container in the fridge. The cheese sauce can also be made 2-3 days ahead of time. You can store the cheese sauce separately from the green beans in the fridge OR combine the beans and cheese sauce without the fried onions/shallots. Mix in the onions/shallots just prior to baking.