Cans and bottles have two completely different needs. Pete specifically mentioned cans which I know a little about. Bottles I don't know about except that they definitely do have a limited shelf life. I have attached a link that goes into it a little.
Beer using modern canning techniques will
in theory last for ever. Effectively it will outlive it's consumer. Unlike a bottle or a barrel there is no on the shelf processing done to any noticeable degree. Chemicals are added to the beer to stop any further fermentation and degradation. This is why many real beer brewers will not brew cans as they do not wish to be associated with what they consider to be fake beer. (This information comes from Fullers who do not brew beer for cans.)
This all means that the taste
should remain consistent as long as the can remains undamaged or unopened. The debate about "how long" is still going on. There are visible changes ion the contents of canned beers after 12 months or so.
Under old British regulations, which I believe have been superseded by EU regulations beer must have a sell by date.
A "sell by" date is just the "consume by" date minus a period deemed to be acceptable for the consumer to keep it stored. In Southern England this would be up to two weeks. In the North it is measured in minutes. In Liverpool most canned beer is consumed before reaching the check out.
As beer falls into the general "beer" category it requires a "consume by" date. This is one year from the canning date. I believe that is the EU maximum but not 100% sure. It has absolutely no meaning whatsoever and is just there to satisfy demands of the EU officials who have just been re-assigned from specifying the size and shape of a banana. The one year keeps the brewers, wholesalers and retailers happy enough. There is quite a lot of movement in beers to satisfy local demands so a short lifetime is unacceptable.
Beer canning here in Thailand is just as hi tech as in the west so I can't see why a beer should taste any different after two months and I would like to see anybody who says it does to take the blindfold test. However my taste buds have been shot to pieces by tobacco, Indian curries and South American tea so maybe I am wrong on that one.
What I can tell though, is that a can of Singha poured into a glass does not taste the same as a bottle of Singha poured into the same glass. If anybody can supply six of each I will willingly take the blindfold test.
http://beeradvocate.com/beer/101/store.php