因為做網(wǎng)站的靜態(tài)頁緩存,所以做了這個測試
1、 MVC項目
準(zhǔn)備了4個Action,分兩組,一組是讀取本地磁盤的一個html頁面文件,一組是延時2秒
public class TestController : Controller{ public ActionResult Article(string name) { string path = @"I:\c#\nn.html"; using (StreamReader reader = new StreamReader(path)) { return Content(reader.ReadToEnd()); } } public async Task<ActionResult> Article2(string name) { string path = @"I:\c#\nn.html"; using (StreamReader reader = new StreamReader(path)) &nb