Kendo ui 在asp.net MVC kendoUI中使用CacheCow

Kendo ui 在asp.net MVC kendoUI中使用CacheCow,kendo-ui,asp.net-mvc-5,kendo-asp.net-mvc,cachecow,Kendo Ui,Asp.net Mvc 5,Kendo Asp.net Mvc,Cachecow,我一直在研究如何安装CacheCow(),只需应用nuget软件包,然后添加: GlobalConfiguration.Configuration.MessageHandlers.Add(new CacheCow.Server.CachingHandler(GlobalConfiguration.Configuration)); 到我的全局配置文件。一旦我这样做了,我的所有网格都不会正常刷新,它们都会缓存旧值,而不管新数据是否可用。我使用了标题: [OutputCache(NoStore =

我一直在研究如何安装CacheCow(),只需应用nuget软件包,然后添加:

GlobalConfiguration.Configuration.MessageHandlers.Add(new CacheCow.Server.CachingHandler(GlobalConfiguration.Configuration));
到我的全局配置文件。一旦我这样做了,我的所有网格都不会正常刷新,它们都会缓存旧值,而不管新数据是否可用。我使用了标题:

[OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")]  
public JsonResult _GetProjectList([DataSourceRequest] DataSourceRequest request)
{
    return Json(data.ToDataSourceResult(request, ModelState), JsonRequestBehavior.AllowGet);
}

用于顶部的outputcache,但这似乎没有帮助。任何人都有在剑道数据源中使用cachecow的经验,以及如何让它们相互协作?

您可以尝试将此作为解决方案

[OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")]  
public JsonResult _GetProjectList([DataSourceRequest] DataSourceRequest request)
{
    //force the response to not cache the results. 
    this.Response.Cache.SetCacheability(HttpCacheability.NoCache);


    //some code here......
    return Json(data.ToDataSourceResult(request, ModelState), JsonRequestBehavior.AllowGet);
}
不久前,当我注意到一些剑道小部件没有正确更新其数据源时,我不得不这么做。(当我在浏览器的开发工具中关闭浏览器缓存时,它们确实更新了)


虽然我还没有使用过那个特别的软件包,但希望它能对你有用

谢谢你的建议,但不幸的是,这并没有解决我的问题。我猜你的线条和我的属性在很大程度上是一样的。CacheCow似乎忽略了该设置,我在他们的文档中没有看到任何关于如何更改该设置的内容