我正在使用 MVC 和 OutputCache 属性进行客户端缓存。
当我将 OutputCache Location 设置为 Client 时,我期望看到的是第二个并继续请求,不应执行操作。如果不超过时间,OutputCache 需要发送 302 响应码。但实际上这不会发生,当我刷新页面操作正在运行时。为什么 outputCache 不发送 302 响应代码并阻止操作运行。
[OutputCache(Location=OutputCacheLocation.Client,Duration=60)]
public ActionResult Text()
{
return Content("text");
}