Bug: if there was a timeout when calculating the page count, the timeout wouldn't be cached, so we would hit multiple timeouts trying to calculate the page count multiple times.
Bug: if there was a timeout when calculating the page count, the timeout wouldn't be cached, so we would hit multiple timeouts trying to calculate the page count multiple times.