By 400 BC, Persian engineers had figured out how to store ice in the middle of the desert. Pretty good for ancient engineers. These "yakhchals" were located above ground. They were domed and made of heat-resistant material. This kept them cold year-round.
Ice from nearby mountains was brought in during the winter and stored there. These structures were occasionally used for storing food as well. The 60-foot conic buildings would have a massive insulation on te outside and a massive subterranean structures that would keep water cool.
The Yakhchals were so good that they allowed for cooling even during the hottest times of the year. In fact, they even had trenches on the outside that allowed for water to refreeze during the cold desert nights. This allowed them to work year round!