1. Bring a large pot of salted water to a boil. In a large, deep skillet, heat the olive oil. Add the garlic, onion and crushed red pepper and cook over moderately high heat, stirring occasionally, until the garlic and onion are softened, about 5 minutes. Add the squash and thyme, season with salt and pepper and cook for 5 minutes, stirring occasionally. Cover and cook over moderately low heat, stirring occasionally, until the squash is tender, about 5 minutes.
2. Meanwhile, add the cavatelli to the boiling water and cook until al dente. Drain, reserving 1 cup of the pasta cooking water. Add the cavatelli to the squash mixture in the skillet, then stir in 1/2 cup of the pasta cooking water and toss gently to combine. Add the 3/4 cup of caciocavallo, season with salt and pepper and stir gently; add a little more pasta water if necessary. Serve the pasta right away, passing more cheese at the table.