protected override void OnActionExecuted(ActionExecutedContext filterContext)
{
base.OnActionExecuted(filterContext);
AddRequiredInfoToViewBag();
if (Request.IsAjaxRequest())
{
Response.CacheControl = "no-cache";
Response.Cache.SetETag((Guid.NewGuid()).ToString());
}
}
当我从部分View调用动作时,上面的代码崩溃了。有人知道如何检查ETag是否已在缓存中设置?