In a large bowl, whisk 1⁄4 teaspoon sugar and the yeast with 1⁄2 cup plus 2 tablespoons lukewarm water and let stand until foamy, about 10 minutes. Stir in the semolina flour, 1 tablespoon olive oil, and the 1⁄2 teaspoon salt until the dough comes together. Scrape the dough onto a lightly floured work surface and knead until smooth, about 8 minutes. Transfer the dough to a clean bowl, cover with plastic wrap, and let stand at room temperature until doubled in size, about 2 hours.
Meanwhile, pour the tomatoes and their juice into a blender and purée until smooth. In a small saucepan, warm the remaining 1 tablespoon olive oil over medium heat. Add the garlic and cook, stirring, until fragrant and beginning to brown, about 2 minutes. Pour the tomatoes into the saucepan along with the remaining 1 teaspoon sugar, bring to a simmer, and cook, stirring occasionally, until the sauce thickens slightly, about 10 minutes. Remove the sauce from the heat, stir in the basil, and season liberally with salt and pepper.
Heat the oven to 450°. Line a 9-by-5-inch loaf pan with parchment paper. Scrape the dough onto a lightly floured work surface. Using a rolling pin, flatten the dough into a 1⁄16-inch-thick, 26-by-18-inch rectangle, and position the rectangle so that a long side is nearest to you. Spread half the tomato sauce over the middle three-fifths of the rectangle, then sprinkle the sauce with half of the caciocavallo slices. Fold the two plain sides of the dough over so their edges overlap in the middle of the rectangle by 2 inches.
Spread the remaining sauce over the left two-thirds of the dough, and sprinkle the sauce with the remaining slices of caciocavallo. Fold the righthand, plain third over the sauce, then fold the lefthand side of dough over, like completing the tri-fold of a letter. Fold the dough crosswise to create a 9-inch-long rectangular pie. Transfer the pie to the prepared loaf pan, pierce the top with the tines of a fork, and bake until dark brown on the top and lightly charred at the edges, about 1 hour. Immediately invert the pie onto a rack, remove the loaf pan and parchment paper, and let the pie cool in this position for 10 minutes. Invert the pie right-side-up before serving.