It may help to think of cider shelf-life as an arc depending on the factors already stated. Some ciders, such as a low ABV, unsulfited, corked, still wine may be best shortly after bottling. Meanwhile, a strong apple wine, properly sulfited, sparkling with a crown closure may peak sometime after 3-4 years (shot in the dark estimate).
Wines behave the same way.
In all the states no door stands wider,
To ask you in to drink hard cider