There are issues being conflated in this thread.
If one wants to be very picky, and one gets to know one's coffees, there is usually a relatively short window, maybe 2 days, when the coffee is at its absolute best, at least according to any given individual's taste (e.g. my "best" days might be days 3-5 and yours might be 5-7, for the same coffee, but if we are used to drinking this coffee and are experienced espresso drinkers, we would probably be fairly consistent within the confines of our own taste). The above discussion assumes either a single origin kept in steady state (either used up while still fresh or frozen as green), or a blend that hasn't changed (unlikely after a few months), and that is roasted, stored, ground, and extracted consistently.
OK, so that is one part of the equation, but another part is going to be determined by the practical aspects. These are things like how much coffee does one buy at a time, how is it stored, etc. etc. etc., which will be effected by such things as whether one home roasts, and if not, shipping distances, transit times, cost of shipping, etc. So one is looking for some sort of balance, including a cost-benefit analysis, since most people who do not home roast do not want to buy small quantities of fresh coffee and have it shipped at great expensive every few days.
I proposed a strategy some time back to maximize the amount of coffee at peak that one consumes. It is found in this thread and it is basically what I do personally:
Better Espresso thru Freezingken