Coffee goes stale by reaction with oxygen in the air. Chemical reactions progress slower the colder it is, so it would make sense to keep coffee in as cold of place as possible. However, after considering some factors, it becomes evident that it may not be best to follow this rule. For starters, keep in mind that coffee is very good at absorbing flavors so if it is kept in the freezer or refrigerator your cup of coffee will tend to taste like whatever that area of your freezer or refrigerator smells like, which can have some unpleasant results. Also, taking coffee out of a refrigerator or freezer will cause water to condense onto the inside of the container and onto the coffee (remember that moisture is not good for coffee storage). That would likely happen unless the coffee was kept in an airtight container and that after it was removed from the freezer or refrigerator it was set out for long enough for the temperatures inside the bag and outside the bag to equalize (which would take a while). The freezer can be an especially harsh place to store coffee because there is some residual water in roasted coffee that can expand and cause little fractures in the bean so that when the coffee is taken out of the freezer it goes stale faster. So in the end, the solution is buying fresh-roasted coffee and only enough to last you a week or two.