Café owners that buy from a local roaster sometimes do have fresh coffee but, obviously, they can't proudly serve their own creation. The passion of creation communicates very well at the counter. Perhaps they do not really know when the coffee beans were roasted. One RoastMaster explained it like this: we put it for sale as an estate arabica, after some time we make blends, and if we still have some left we wet a cloth with some flavouring and tumble it and the beans in a small drum. Is that flavouring to enhance or mask? To the Café owner "Does the cost of your coffee pay for your roaster or your supplier's?"
A lot of lobbying dollars were spent to convince governments that coffee beans last more than 18 months therefore did not require expiry dates, in other words they concluded that roasted beans were non perishable. This decision was required by centralized roasters and grocery chains because they cannot transport the beans to client coffee pots within two weeks. Consequently, they promote peripheral messages such as freshly ground, freshly brewed, consistency, convenience, low price, contests, etc. They can accessorize the product as much as they want but if you start with stale beans you can't make a quality drink. Coffee parallels the preparation of food in that increased processing equals diminished quality. Some of the tricks are to add cheaper robusta beans, which are more bitter than arabica beans, to the blend so that the espresso will have more crema like freshly roasted coffee. It is not a great espresso and most likely they will suggest that you give it some zing with a flavouring. Freshly roasted coffee has plenty of zing plus it has complexity that a flavouring does not even try to achieve.
Out of curiosity two books were consulted; one by a large Italian central roaster and other by UK specialists. The first only mentions "freshness" as it pertains to serving it quickly after it is brewed. The second book does not mention freshness. Freshness is not part of the centralized roasting business model. As a consumer the choice is yours "Do you wish to pay for freshness or warehousing?".
Packaging is often ascribed miracle properties. In the first day(s) following roasting the beans emit a lot of carbon dioxide which can burst bags. Hence, the use of the valve. If the valve is the highest point in the bag the CO2 will force out the lighter gases such as air which is beneficial but it is hardly locking the flavour in. One web site says that packaged coffee lasts a few months until the bag is opened but a little further down they claim: How long does coffee last? Coffee packaged with a freshness valve = 12 months then add a little further Ground coffee once the bag is opened = 2 weeks. Check for consistency of message and verify that information. Your priority is taste or the coffee experience theirs is sales. Studies have been done about slowing down the degradation through cold storage but that requires colder deep freezers than those in homes. An additional problem is that, due to the pressure differential, the deep freeze is the area with the highest humidity in a house. Moisture accelerates staleness.
If possible observe a roasting session, you will learn. You may find that some of the urban based coffee roasters are not used because of pollution complaints and that some RoastMasters , that do not have Afterburners, roast during the night.
To improve the roasted beans' relatively short lifespan they should be ground just before brewing. Make a comparison with beans that have been ground for half an hour. I expect that after half an hour the finely ground beans will make a flat coffee. An espresso will have greatly reduced crema. You will then be in a position to judge the statement "Ground coffee once the bag is opened = 2 weeks"
My mantra is "Buy from the roaster".