Lithium batteries can have life span up to 10 years, I have some lithium batteries integrated in some IC/uC over 10 years and still working.
Generaly for batteries based on lithium material its not good to keep them in temp area of 50C and above, will be good to keep them around 22-25C temp space.
Alkaline batteries have resting life span about 4-5 years but who knows, maybe some leak before this time or later.
Non-rechargable batteries dont have that problem like rechargable about self discharge. They can have problem of battery material aging and starting of some chemical process inside them under some non adequate temp conditions, which will be reflected on battery capacity during usage.