set cache time from configuration