You should not keep coffee in the fridge.
Since refrigerators are humid and moist the humidity and moisture from the fridge can be absorbed by the coffee making the coffee stale and hard.
It's best to just keep coffee in it's container in the pantry or on the counter.
I've never refrigerated ground coffee or coffee beans and there's really no need too.
Coffee Grounds and coffee beans best store at room temperature away from any moisture or humidity.
The coffee grounds can also absorb the food odors from the food in the refrigerator so the coffee may taste like some of the food in your fridge.
The fridge is not the place to store coffee in any form, ground or whole bean even if in an airtight container.
It isn't cold enough to keep your coffee fresh, and because coffee works as a deodorizer, it will absorb all the aromas in your fridge.
Ideally, you want to store coffee beans in a container that lets no light through, like stainless steel or ceramic.
It's not just because those kinds of coffee canisters look beautiful on your kitchen counter.
It's because they're necessary.