factor out calculation of product list cache expiration time

follow up of #582