Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/performance/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net mvc 为什么TTFB对来自MVC OutputCache的304响应如此之长?_Asp.net Mvc_Performance_Iis 7.5_Outputcache - Fatal编程技术网

Asp.net mvc 为什么TTFB对来自MVC OutputCache的304响应如此之长?

Asp.net mvc 为什么TTFB对来自MVC OutputCache的304响应如此之长?,asp.net-mvc,performance,iis-7.5,outputcache,Asp.net Mvc,Performance,Iis 7.5,Outputcache,我已使用OutputCache筛选器为我们的主页配置了以下主要操作: [OutputCache(Duration = 172800, Location = OutputCacheLocation.ServerAndClient, VaryByCustom = "browser")] public ActionResult Index() { return View(); } 请注意,此操作将根据所使用的浏览器类型返回页面。我有一个自定义视图引擎,根据浏览器是台式机、平板电脑还是移动设备

我已使用OutputCache筛选器为我们的主页配置了以下主要操作:

[OutputCache(Duration = 172800, Location = OutputCacheLocation.ServerAndClient, VaryByCustom = "browser")]
public ActionResult Index()
{
    return View();
}
请注意,此操作将根据所使用的浏览器类型返回页面。我有一个自定义视图引擎,根据浏览器是台式机、平板电脑还是移动设备,返回不同的视图,因此浏览器会有所不同

在生产现场,这显示始终有大约300毫秒的TTFB。为什么要花这么长时间才能回来

这是一个304响应

运行MVC5的IIS 7.5

不涉及数据库调用

当然这个请求应该直接从RAM中提供吗


有人能帮忙吗?

有多少数据?我认为304响应只是意味着服务器正在提供缓存页面而不是生成它,但这并不意味着它仍然不需要下载。还取决于服务器中正在进行的其他操作。如果是少量数据,而服务器没有做任何其他事情,那么我会说这很奇怪。我不再做那个项目了,但它是一个简单的HTML页面。。。大约70KB。有多少数据?我认为304响应只是意味着服务器正在提供缓存页面而不是生成它,但这并不意味着它仍然不需要下载。还取决于服务器中正在进行的其他操作。如果是少量数据,而服务器没有做任何其他事情,那么我会说这很奇怪。我不再做那个项目了,但它是一个简单的HTML页面。。。大约70KB。